-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c319414
commit aba0d83
Showing
5 changed files
with
75 additions
and
11 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
crates/ruff_linter/resources/test/fixtures/pep8_naming/N817.py
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,2 +1,6 @@ | ||
import mod.CaMel as CM | ||
from mod import CamelCase as CC | ||
|
||
|
||
# OK depending on configured import convention | ||
import xml.etree.ElementTree as ET |
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
23 changes: 23 additions & 0 deletions
23
...s/ruff_linter__rules__pep8_naming__tests__camelcase_imported_as_incorrect_convention.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pep8_naming/mod.rs | ||
--- | ||
N817.py:1:8: N817 CamelCase `CaMel` imported as acronym `CM` | ||
| | ||
1 | import mod.CaMel as CM | ||
| ^^^^^^^^^^^^^^^ N817 | ||
2 | from mod import CamelCase as CC | ||
| | ||
|
||
N817.py:2:17: N817 CamelCase `CamelCase` imported as acronym `CC` | ||
| | ||
1 | import mod.CaMel as CM | ||
2 | from mod import CamelCase as CC | ||
| ^^^^^^^^^^^^^^^ N817 | ||
| | ||
|
||
N817.py:6:8: N817 CamelCase `ElementTree` imported as acronym `ET` | ||
| | ||
5 | # OK depending on configured import convention | ||
6 | import xml.etree.ElementTree as ET | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ N817 | ||
| |