Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fix pre-commit linting (#3877)

adeshpandefa65b488b02a
diff --git a/manim/_config/utils.py b/manim/_config/utils.py
index 46613e8d7..c70c1fb94 100644
--- a/manim/_config/utils.py
+++ b/manim/_config/utils.py
@@ -323,7 +323,7 @@ class ManimConfig(MutableMapping):
}
def __init__(self) -> None:
- self._d: dict[str, Any | None] = {k: None for k in self._OPTS}
+ self._d: dict[str, Any | None] = dict.fromkeys(self._OPTS)
# behave like a dict
def __iter__(self) -> Iterator[str]:
diff --git a/manim/mobject/graph.py b/manim/mobject/graph.py
index 72a26d27d..8afcf0301 100644
--- a/manim/mobject/graph.py
+++ b/manim/mobject/graph.py
@@ -826,7 +826,7 @@ class GenericGraph(VMobject, metaclass=ConvertToOpenGL):
labels = {v: labels for v in vertices}
else:
assert isinstance(labels, dict)
- base_labels = {v: False for v in vertices}
+ base_labels = dict.fromkeys(vertices, False)
base_labels.update(labels)
labels = base_labels