Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Add support for `pycodestyle W` rule in Ruff (#4276)

Kaique Barbosa Dultrad517b505674e
diff --git a/.github/codeql.yml b/.github/codeql.yml
index be207a077..7603545ab 100644
--- a/.github/codeql.yml
+++ b/.github/codeql.yml
@@ -9,6 +9,8 @@ query-filters:
id: py/multiple-calls-to-init
- exclude:
id: py/missing-call-to-init
+ - exclude:
+ id: py/method-first-arg-is-not-self
paths:
- manim
paths-ignore:
diff --git a/manim/mobject/opengl/opengl_compatibility.py b/manim/mobject/opengl/opengl_compatibility.py
index 663217541..94991d544 100644
--- a/manim/mobject/opengl/opengl_compatibility.py
+++ b/manim/mobject/opengl/opengl_compatibility.py
@@ -21,7 +21,7 @@ class ConvertToOpenGL(ABCMeta):
_converted_classes = []
- def __new__(mcls, name, bases, namespace): # noqa: B902
+ def __new__(mcls, name, bases, namespace):
if config.renderer == RendererType.OPENGL:
# Must check class names to prevent
# cyclic importing.
@@ -40,6 +40,6 @@ class ConvertToOpenGL(ABCMeta):
return super().__new__(mcls, name, bases, namespace)
- def __init__(cls, name, bases, namespace): # noqa: B902
+ def __init__(cls, name, bases, namespace):
super().__init__(name, bases, namespace)
cls._converted_classes.append(cls)
diff --git a/manim/utils/simple_functions.py b/manim/utils/simple_functions.py
index 78951c105..373596065 100644
--- a/manim/utils/simple_functions.py
+++ b/manim/utils/simple_functions.py
@@ -98,7 +98,7 @@ class Comparable(Protocol):
def __gt__(self, other: Any) -> bool: ...
-ComparableT = TypeVar("ComparableT", bound=Comparable) # noqa: Y001
+ComparableT = TypeVar("ComparableT", bound=Comparable)
def clip(a: ComparableT, min_a: ComparableT, max_a: ComparableT) -> ComparableT:
diff --git a/pyproject.toml b/pyproject.toml
index 7afdf28a7..22ad10dff 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -151,6 +151,7 @@ select = [
"C4",
"D",
"E",
+ "W",
"F",
"I",
"PGH",