-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider ignore-names in all pep8 naming rules (#5079)
## Summary This changes all remaining pep8 naming rules to consider the `ingore-names` argument. Closes #5050 ## Test Plan Added new tests.
- Loading branch information
Thomas de Zeeuw
committed
Jun 14, 2023
1 parent
6f10aee
commit e7316c1
Showing
32 changed files
with
400 additions
and
12 deletions.
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
11 changes: 11 additions & 0 deletions
11
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/N801.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class badAllowed: | ||
pass | ||
|
||
class stillBad: | ||
pass | ||
|
||
class BAD_ALLOWED: | ||
pass | ||
|
||
class STILL_BAD: | ||
pass |
13 changes: 13 additions & 0 deletions
13
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/N807.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
def __badAllowed__(): | ||
pass | ||
|
||
def __stillBad__(): | ||
pass | ||
|
||
|
||
def nested(): | ||
def __badAllowed__(): | ||
pass | ||
|
||
def __stillBad__(): | ||
pass |
5 changes: 5 additions & 0 deletions
5
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/N811.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import mod.BAD_ALLOWED as badAllowed | ||
import mod.STILL_BAD as stillBad | ||
|
||
from mod import BAD_ALLOWED as badAllowed | ||
from mod import STILL_BAD as stillBad |
5 changes: 5 additions & 0 deletions
5
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/N812.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import mod.badallowed as badAllowed | ||
import mod.stillbad as stillBad | ||
|
||
from mod import badallowed as BadAllowed | ||
from mod import stillbad as StillBad |
8 changes: 8 additions & 0 deletions
8
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/N813.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import mod.BadAllowed as badallowed | ||
import mod.stillBad as stillbad | ||
|
||
from mod import BadAllowed as badallowed | ||
from mod import StillBad as stillbad | ||
|
||
from mod import BadAllowed as bad_allowed | ||
from mod import StillBad as still_bad |
8 changes: 8 additions & 0 deletions
8
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/N814.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import mod.BadAllowed as BADALLOWED | ||
import mod.StillBad as STILLBAD | ||
|
||
from mod import BadAllowed as BADALLOWED | ||
from mod import StillBad as STILLBAD | ||
|
||
from mod import BadAllowed as BAD_ALLOWED | ||
from mod import StillBad as STILL_BAD |
5 changes: 5 additions & 0 deletions
5
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import mod.BadAllowed as BA | ||
import mod.StillBad as SB | ||
|
||
from mod import BadAllowed as BA | ||
from mod import StillBad as SB |
11 changes: 11 additions & 0 deletions
11
crates/ruff/resources/test/fixtures/pep8_naming/ignore_names/N818.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class BadAllowed(Exception): | ||
pass | ||
|
||
class StillBad(Exception): | ||
pass | ||
|
||
class BadAllowed(AnotherError): | ||
pass | ||
|
||
class StillBad(AnotherError): | ||
pass |
Empty file.
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
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
Oops, something went wrong.