[flake8-builtins] Default to non-strict checking (A005)#16125
Merged
ntBre merged 1 commit intomicha/ruff-0.10from Mar 11, 2025
Merged
[flake8-builtins] Default to non-strict checking (A005)#16125ntBre merged 1 commit intomicha/ruff-0.10from
flake8-builtins] Default to non-strict checking (A005)#16125ntBre merged 1 commit intomicha/ruff-0.10from
Conversation
Contributor
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| A005 | 103 | 0 | 103 | 0 | 0 |
Linter (preview)
✅ ecosystem check detected no linter changes.
Member
|
Did you look through the ecosystem check? We'll have to wait with merging this until the 0.10 release. |
Contributor
Author
|
I just looked through the ecosystem check and it looks like what I expected. There are a lot of deeply nested I labeled with |
Member
|
It should be fine. I added the |
44eec2b to
e4e1c58
Compare
Member
|
@ntBre feel free to merge this after rebasing onto the ruff-0.10 branch |
2d3dc7c to
b509726
Compare
b509726 to
3446ecf
Compare
MichaReiser
pushed a commit
that referenced
this pull request
Mar 13, 2025
## Summary This PR changes the default value of `lint.flake8-builtins.builtins-strict-checking` added in #15951 from `true` to `false`. This also allows simplifying the default option logic and removes the dependence on preview mode. #15399 was already closed by #15951, but this change will finalize the behavior mentioned in #15399 (comment). As an example, strict checking flags modules based on their last component, so `utils/logging.py` triggers A005. Non-strict checking checks the path to the module, so `utils/logging.py` is allowed (this is the example and desired behavior from #15399 exactly) but a top-level `logging.py` or `logging/__init__.py` is still disallowed. ## Test Plan Existing tests from #15951 and #16006, with the snapshot updated in `a005_module_shadowing_strict_default` to reflect the new default.
MichaReiser
pushed a commit
that referenced
this pull request
Mar 13, 2025
## Summary This PR changes the default value of `lint.flake8-builtins.builtins-strict-checking` added in #15951 from `true` to `false`. This also allows simplifying the default option logic and removes the dependence on preview mode. #15399 was already closed by #15951, but this change will finalize the behavior mentioned in #15399 (comment). As an example, strict checking flags modules based on their last component, so `utils/logging.py` triggers A005. Non-strict checking checks the path to the module, so `utils/logging.py` is allowed (this is the example and desired behavior from #15399 exactly) but a top-level `logging.py` or `logging/__init__.py` is still disallowed. ## Test Plan Existing tests from #15951 and #16006, with the snapshot updated in `a005_module_shadowing_strict_default` to reflect the new default.
ntBre
added a commit
that referenced
this pull request
Apr 22, 2025
Summary -- Delete a TODO I left that was handled in the last minor release (#16125). Test Plan -- N/a
ntBre
added a commit
that referenced
this pull request
Apr 22, 2025
Summary -- Delete a TODO I left that was handled in the last minor release (#16125). Test Plan -- N/a
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes the default value of
lint.flake8-builtins.builtins-strict-checkingadded in #15951 fromtruetofalse. This also allows simplifying the default option logic and removes the dependence on preview mode.#15399 was already closed by #15951, but this change will finalize the behavior mentioned in #15399 (comment).
As an example, strict checking flags modules based on their last component, so
utils/logging.pytriggers A005. Non-strict checking checks the path to the module, soutils/logging.pyis allowed (this is the example and desired behavior from #15399 exactly) but a top-levellogging.pyorlogging/__init__.pyis still disallowed.Test Plan
Existing tests from #15951 and #16006, with the snapshot updated in
a005_module_shadowing_strict_defaultto reflect the new default.