[flake8-builtins] Update documentation (A005)#16097
Merged
Conversation
Follow-up to #15951 to update * the options links in A005 to reference `lint.flake8-builtins.builtins-strict-checking` * the description of the rule to explain strict vs non-strict checking * the option documentation to point back to the rule
Contributor
|
DaniBodor
reviewed
Feb 11, 2025
| /// `a/logging.py`, `a/b/logging.py`, and so on would all clash with the builtin `logging` module. | ||
| /// With the [`lint.flake8-builtins.builtins-strict-checking`] option set to `false`, the module | ||
| /// path is considered, so only a top-level `logging.py` or `logging/__init__.py` will trigger the | ||
| /// rule and `utils/logging.py`, for example, would not. |
Contributor
There was a problem hiding this comment.
perhaps re-use example from above a/logging.py (or use the utils/logging.py example above)?
Contributor
Author
There was a problem hiding this comment.
I think that's a good idea, thanks! I went for a consistent use of the logging example:
What do you think?
MichaReiser
reviewed
Feb 11, 2025
Comment on lines
26
to
31
| /// By default, only the last component of the module name is considered, so `logging.py`, | ||
| /// `utils/logging.py`, and `utils/logging/__init__.py` would all clash with the builtin `logging` | ||
| /// module. With the [`lint.flake8-builtins.builtins-strict-checking`] option set to `false`, the | ||
| /// module path is considered, so only a top-level `logging.py` or `logging/__init__.py` will | ||
| /// trigger the rule and `utils/logging.py`, for example, would not. | ||
| /// |
Member
There was a problem hiding this comment.
We should document here or on the option the difference between preview and non preview. The way I remember it is that the default changes based on preview mode.
MichaReiser
approved these changes
Feb 12, 2025
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.
Follow-up to #15951 to update
lint.flake8-builtins.builtins-strict-checking