-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[flake8-builtins
] Rename A005
and improve its error message
#15348
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 1 addition & 2 deletions
3
...ruff_linter__rules__flake8_builtins__tests__A005_A005__modules__logging____init__.py.snap
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,5 +1,4 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_builtins/mod.rs | ||
snapshot_kind: text | ||
--- | ||
__init__.py:1:1: A005 Module `logging` is shadowing a Python builtin module | ||
__init__.py:1:1: A005 Module `logging` shadows a Python standard-library module |
3 changes: 1 addition & 2 deletions
3
...s/ruff_linter__rules__flake8_builtins__tests__A005_A005__modules__package__bisect.py.snap
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,5 +1,4 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_builtins/mod.rs | ||
snapshot_kind: text | ||
--- | ||
bisect.py:1:1: A005 Module `bisect` is shadowing a Python builtin module | ||
bisect.py:1:1: A005 Module `bisect` shadows a Python standard-library module |
3 changes: 1 addition & 2 deletions
3
...ke8_builtins__tests__A005_A005__modules__package__bisect.py_builtins_allowed_modules.snap
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,5 +1,4 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_builtins/mod.rs | ||
snapshot_kind: text | ||
--- | ||
bisect.py:1:1: A005 Module `bisect` is shadowing a Python builtin module | ||
bisect.py:1:1: A005 Module `bisect` shadows a Python standard-library module |
3 changes: 1 addition & 2 deletions
3
...hots/ruff_linter__rules__flake8_builtins__tests__A005_A005__modules__package__xml.py.snap
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,5 +1,4 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_builtins/mod.rs | ||
snapshot_kind: text | ||
--- | ||
xml.py:1:1: A005 Module `xml` is shadowing a Python builtin module | ||
xml.py:1:1: A005 Module `xml` shadows a Python standard-library module |
3 changes: 1 addition & 2 deletions
3
.../ruff_linter__rules__flake8_builtins__tests__A005_A005__modules__string____init__.py.snap
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,5 +1,4 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_builtins/mod.rs | ||
snapshot_kind: text | ||
--- | ||
__init__.py:1:1: A005 Module `string` is shadowing a Python builtin module | ||
__init__.py:1:1: A005 Module `string` shadows a Python standard-library module |
3 changes: 1 addition & 2 deletions
3
...e8_builtins__tests__A005_A005__modules__string____init__.py_builtins_allowed_modules.snap
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,5 +1,4 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_builtins/mod.rs | ||
snapshot_kind: text | ||
--- | ||
__init__.py:1:1: A005 Module `string` is shadowing a Python builtin module | ||
__init__.py:1:1: A005 Module `string` shadows a Python standard-library module |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update the settings name as well? (
lint.flake8-builtins.builtins-allowed-modules
) I think not but thought raise it regardless. Aside, the double "builtins" is a bit unfortunate.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good catch. I think we should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to avoid the rename here and directly rename it to remove the "builtins" prefix from both options. I'll open a tracking issue but happy to hear any suggestions if you think otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#15368