Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missed ChatPermissions to __all__ #393

Merged
merged 2 commits into from Sep 13, 2020
Merged

Conversation

uburuntu
Copy link
Contributor

Add missed ChatPermissions to all

Fix for this warning:

Also standardize all __all__'s as sorted tuples along the project.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

On my bot

@uwinx
Copy link
Contributor

uwinx commented Jul 28, 2020

Also standardize all all's as sorted tuples along the project.

Any links to this standard? As far as I know, it must be list of strings.

@uburuntu
Copy link
Contributor Author

https://docs.python.org/3/reference/simple_stmts.html#the-import-statement

The public names defined by a module are determined by checking the module’s namespace for a variable named __all__; if defined, it must be a sequence of strings which are names defined or imported by that module.

It doesn't matter that they are lists or tuples. But tuple was already used in types/, so I decided use it everywhere for increasing consistency.

Copy link
Contributor

@uwinx uwinx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember which linterish tool used to complain about type of __all__

seems reasonable and lgtm!

@JrooTJunior JrooTJunior merged commit 5b40a2b into aiogram:dev-2.x Sep 13, 2020
@uburuntu uburuntu deleted the __all__ branch September 13, 2020 22:02
uburuntu added a commit to uburuntu/aiogram that referenced this pull request Oct 4, 2020
* new: add missed ChatPermissions to __all__

* ref: standardize all __all__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants