fix/refactor: add missing imports and reorganize some alls #1672
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Pull Request Type
Description
I've recently developed a tool that goes in and makes sure that each
__init__.pymatches up with the__all__s in files/folders in the same directory as it. For example, if there was a statement likefrom .channel import GuildText, the program will go in and make sure the__all__ofchannelis("GuildText",), and fixes the import if the__all__doesn't match up. It also detects if the__init__isn't importing a file with a__all__in it and adds it to the import.This tool is far from ready, but I've gotten it to a state where I could run a run on the interactions.py library. Wouldn't you know it, we are missing some imports, so I made this PR to add them back in. This PR also fixes some other issues I was running into involving the codebase, like
GuildMedianot being properly exposed inchannel.py.As a (hopefully good) consequence of this program,
__all__for__init__.pys that have been affected have been put in alphabetical order.Changes
GuildMediato__all__inchannel.pyfor models.CronTrigger.LocalisedFieldandLocalizedField.ClientObjectandDiscordObject. You may argue against it, but I'd argue that there's no good reason to not export them, and they can have their uses.deserialize_app_cmds, interestingly enough.__all__s that have been adjusted.Related Issues
Test Scenarios
Python Compatibility
3.10.x3.11.xChecklist
pre-commitcode linter over all edited files