-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[flake8-builtins] Default to non-strict checking (A005)
#16125
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
Conversation
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| A005 | 103 | 0 | 103 | 0 | 0 |
Linter (preview)
✅ ecosystem check detected no linter changes.
|
Did you look through the ecosystem check? We'll have to wait with merging this until the 0.10 release. |
|
I just looked through the ecosystem check and it looks like what I expected. There are a lot of deeply nested I labeled with |
|
It should be fine. I added the |
44eec2b to
e4e1c58
Compare
|
@ntBre feel free to merge this after rebasing onto the ruff-0.10 branch |
2d3dc7c to
b509726
Compare
b509726 to
3446ecf
Compare
## 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.
## 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.
Summary -- Delete a TODO I left that was handled in the last minor release (#16125). Test Plan -- N/a
Summary -- Delete a TODO I left that was handled in the last minor release (#16125). Test Plan -- N/a
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.