Skip to content

Commit

Permalink
Ignore explicit overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jul 25, 2023
1 parent 11dd457 commit ad4c015
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
13 changes: 4 additions & 9 deletions crates/ruff/resources/test/fixtures/flake8_builtins/A003.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,9 @@ def str(self) -> None:


class MyClass:
ImportError = 4
id: int
dir = "/"

def __init__(self):
self.float = 5 # is fine
self.id = 10
self.dir = "."

@override
def str(self):
pass

def int(self):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@ A003.py:40:9: A003 Class attribute `str` is shadowing a Python builtin
41 | ...
|

A003.py:52:9: A003 Class attribute `int` is shadowing a Python builtin
|
50 | pass
51 |
52 | def int(self):
| ^^^ A003
53 | pass
|


Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@ A003.py:40:9: A003 Class attribute `str` is shadowing a Python builtin
41 | ...
|

A003.py:52:9: A003 Class attribute `int` is shadowing a Python builtin
|
50 | pass
51 |
52 | def int(self):
| ^^^ A003
53 | pass
|


0 comments on commit ad4c015

Please sign in to comment.