Skip to content

Commit 44da20d

Browse files
[pre-commit.ci] pre-commit autoupdate (#4181)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.11.0](astral-sh/ruff-pre-commit@v0.9.7...v0.11.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e1925e4 commit 44da20d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: check-toml
1414
name: Validate pyproject.toml
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: v0.9.7
16+
rev: v0.11.0
1717
hooks:
1818
- id: ruff
1919
name: ruff lint

manim/mobject/graph.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def _tree_layout(
335335
# Always make a copy of the children because they get eaten
336336
stack = [list(children[root_vertex]).copy()]
337337
stick = [root_vertex]
338-
parent = {u: root_vertex for u in children[root_vertex]}
338+
parent = dict.fromkeys(children[root_vertex], root_vertex)
339339
pos = {}
340340
obstruction = [0.0] * len(T)
341341
o = -1 if orientation == "down" else 1
@@ -810,12 +810,12 @@ def _create_vertices(
810810
vertex_mobjects = {}
811811

812812
graph_center = self.get_center()
813-
base_positions = {v: graph_center for v in vertices}
813+
base_positions = dict.fromkeys(vertices, graph_center)
814814
base_positions.update(positions)
815815
positions = base_positions
816816

817817
if isinstance(labels, bool):
818-
labels = {v: labels for v in vertices}
818+
labels = dict.fromkeys(vertices, labels)
819819
else:
820820
assert isinstance(labels, dict)
821821
base_labels = dict.fromkeys(vertices, False)

0 commit comments

Comments
 (0)