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

Apply ruff suggestions #1479

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

Some ruff rules apply to Python 2.7 too.

Especially, bugbear rules may uncover real bugs.

B006 Do not use mutable data structures for argument defaults
G010 Logging statement uses `warn` instead of `warning`
B015 Pointless comparison. Did you mean to assign a value?
     Otherwise, prepend `assert` or remove it.
B009 Do not call `getattr` with a constant attribute value.
     It is not any safer than normal property access.
UP027 Replace unpacked list comprehension with a generator expression
B020 Loop control variable `...` overrides iterable it iterates
E711 Comparison to `None` should be `cond is None`
E711 Comparison to `None` should be `cond is not None`
E713 Test for membership should be `not in`
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

1 participant