Skip to content

Commit d517b50

Browse files
Add support for pycodestyle W rule in Ruff (#4276)
* Add suport for `pycodestyle W` rule in Ruff and remove invalid noqa comments for deprecated rules * Exclude `py/method-first-arg-is-not-self` false positive for metaclass `__init__` --------- Co-authored-by: Aarush Deshpande <[email protected]>
1 parent 5301ab8 commit d517b50

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.github/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ query-filters:
99
id: py/multiple-calls-to-init
1010
- exclude:
1111
id: py/missing-call-to-init
12+
- exclude:
13+
id: py/method-first-arg-is-not-self
1214
paths:
1315
- manim
1416
paths-ignore:

manim/mobject/opengl/opengl_compatibility.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ConvertToOpenGL(ABCMeta):
2121

2222
_converted_classes = []
2323

24-
def __new__(mcls, name, bases, namespace): # noqa: B902
24+
def __new__(mcls, name, bases, namespace):
2525
if config.renderer == RendererType.OPENGL:
2626
# Must check class names to prevent
2727
# cyclic importing.
@@ -40,6 +40,6 @@ def __new__(mcls, name, bases, namespace): # noqa: B902
4040

4141
return super().__new__(mcls, name, bases, namespace)
4242

43-
def __init__(cls, name, bases, namespace): # noqa: B902
43+
def __init__(cls, name, bases, namespace):
4444
super().__init__(name, bases, namespace)
4545
cls._converted_classes.append(cls)

manim/utils/simple_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __lt__(self, other: Any) -> bool: ...
9898
def __gt__(self, other: Any) -> bool: ...
9999

100100

101-
ComparableT = TypeVar("ComparableT", bound=Comparable) # noqa: Y001
101+
ComparableT = TypeVar("ComparableT", bound=Comparable)
102102

103103

104104
def clip(a: ComparableT, min_a: ComparableT, max_a: ComparableT) -> ComparableT:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ select = [
151151
"C4",
152152
"D",
153153
"E",
154+
"W",
154155
"F",
155156
"I",
156157
"PGH",

0 commit comments

Comments
 (0)