-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't re-export imports outside of
__init__.py
(#2226)
- Loading branch information
Showing
7 changed files
with
23 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
# Target the oldest supported version | ||
target-version = "py37" | ||
|
||
[lint] | ||
select = ["I"] | ||
select = [ | ||
"I", # isort | ||
"PLC", # Pylint Convention | ||
] | ||
|
||
[lint.per-file-ignores] | ||
# Explicit re-exports is fine in __init__.py, still a code smell elsewhere. | ||
"__init__.py" = ["PLC0414"] | ||
|
||
[lint.isort] | ||
combine-as-imports = true | ||
# Because pywin32 has a mix of relative and absolute imports, with undetectable first-party c-extensions | ||
# This makes import grouping more consistent | ||
detect-same-package = false | ||
known-third-party = [ | ||
"__main__", | ||
# This forces distutils imports to always be after setuptools | ||
# setuptools must be imported before distutils because it monkey-patches it. | ||
# distutils is also removed in Python 3.12 and deprecated with setuptools | ||
"distutils", | ||
"__main__", | ||
# This forces distutils imports to always be after setuptools | ||
# setuptools must be imported before distutils because it monkey-patches it. | ||
# distutils is also removed in Python 3.12 and deprecated with setuptools | ||
"distutils", | ||
] | ||
extra-standard-library = ["setuptools"] |
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