-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable flake8-simplify plugin for ruff (#2328)
Fixed: * SIM118 Use `key in dict` instead of `key in dict.keys()` * SIM300 Yoda condition detected * SIM105 Use `contextlib.suppress(...)` instead of `try`-`except`-`pass` * SIM103 Return the condition directly * SIM102 Use a single `if` statement instead of nested `if` statements * SIM112 Use capitalized environment variable * SIM114 Combine `if` branches using logical `or` operator * SIM910 Use `dict.get(key)` instead of `dict.get(key, None)` * SIM401 Use `self.get(key, default)` instead of an `if` block * SIM212 `if`-expression with twisted arms * SIM110 Reimplemented builtin * SIM115 Use a context manager for opening files * SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements Ignored: * SIM108 Use ternary operator instead of `if`-`else`-block Add noqa for `SIM113` and `SIM116` Statistics: 31 SIM118 [*] in-dict-keys 26 SIM105 [ ] suppressible-exception 13 SIM108 [*] if-else-block-instead-of-if-exp 10 SIM103 [ ] needless-bool 10 SIM300 [*] yoda-conditions 9 SIM102 [ ] collapsible-if 8 SIM112 [ ] uncapitalized-environment-variables 7 SIM115 [ ] open-file-with-context-handler 7 SIM117 [ ] multiple-with-statements 5 SIM110 [*] reimplemented-builtin 2 SIM113 [ ] enumerate-for-loop 1 SIM114 [*] if-with-same-arms 1 SIM116 [ ] if-else-block-instead-of-dict-lookup 1 SIM212 [*] if-expr-with-twisted-arms 1 SIM401 [*] if-else-block-instead-of-dict-get 1 SIM910 [*] dict-get-with-none-default
- Loading branch information
Showing
53 changed files
with
221 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.