-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
gh-151428: Remove unused imports from stdlib #151478
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| extend = "../.ruff.toml" # Inherit the project-wide settings | ||
|
|
||
| # Unlike Tools/, stdlib can use newer syntax than PYTHON_FOR_REGEN | ||
| target-version = "py315" | ||
|
|
||
| [lint] | ||
| select = [ | ||
| "F401", # Unused import | ||
| ] | ||
|
|
||
| [lint.per-file-ignores] | ||
| "ctypes/__init__.py" = ["F401"] # Re-exports from _ctypes | ||
| "ensurepip/__init__.py" = ["F401"] # `import zlib` availability check | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in a case like this where there's only one error, I'd usually lean towards using a |
||
| "idlelib/idle_test/htest.py" = ["F401"] # Import for Windows DPI side effect | ||
| "idlelib/idle_test/test_iomenu.py" = ["F401"] # Imports checked for existence | ||
| "importlib/_abc.py" = ["F401"] # Bootstrap-sensitive _bootstrap import | ||
| "importlib/machinery.py" = ["F401"] # NamespacePath re-export | ||
| "importlib/metadata/__init__.py" = ["F401"] # Synced from importlib_metadata | ||
| "profiling/sampling/sample.py" = ["F401"] # Re-exports PROFILING_MODE_* constants | ||
| "ssl.py" = ["F401"] # Re-exports from _ssl | ||
| "warnings.py" = ["F401"] # Re-exports from _py_warnings | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| extend = "../.ruff.toml" # Inherit the project-wide settings | ||
|
|
||
| [per-file-target-version] | ||
| "jit/example_trace_dump.py" = "py312" # Reused-quote f-strings (PEP 701) | ||
|
Comment on lines
+3
to
+4
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this be the target version for the whole |
||
|
|
||
| [lint] | ||
| select = [ | ||
| "F401", # Unused import | ||
| ] | ||
|
|
||
| [lint.per-file-ignores] | ||
| "c-analyzer/c_parser/__init__.py" = ["F401"] # Re-exports from submodules | ||
| "c-analyzer/c_parser/preprocessor/__init__.py" = ["F401"] # Re-exports from submodules | ||
| "c-analyzer/c_parser/preprocessor/common.py" = ["F401"] # Re-exported by preprocessor/__init__.py | ||
|
Comment on lines
+11
to
+14
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding |
||
Uh oh!
There was an error while loading. Please reload this page.