Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 9, 2024
1 parent 5f5dd59 commit 8e01cc8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 8 additions & 3 deletions manim/mobject/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def add_edges(
edge_config = {}
else:
edge_config = deepcopy(edge_config)

batch_default_config, custom_configs = GenericGraph._split_out_child_configs(
edge_config, lambda k: isinstance(k, tuple)
)
Expand All @@ -1075,7 +1075,10 @@ def add_edges(
self._add_edge(
edge,
edge_type=edge_type,
edge_config={**batch_default_config, **custom_configs.get(edge, {})},
edge_config={
**batch_default_config,
**custom_configs.get(edge, {}),
},
).submobjects
for edge in edges
),
Expand Down Expand Up @@ -1727,7 +1730,9 @@ def _split_out_tip_configs(config: dict) -> (dict, dict):
return edge_config, tip_config.get("tip_config", {})

def _create_edge_mobject(self, edge, edge_type):
edge_config, tip_config = DiGraph._split_out_tip_configs(self._edge_config[edge])
edge_config, tip_config = DiGraph._split_out_tip_configs(
self._edge_config[edge]
)
u, v = edge
edge_mobject = edge_type(
self[u],
Expand Down
5 changes: 1 addition & 4 deletions tests/test_graphical_units/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ def test_digraph_add_edges(scene):
"tip_shape": ArrowSquareTip,
"tip_length": 0.15,
},
(3, 4): {
"color": RED,
"tip_config": {"tip_length": 0.25, "tip_width": 0.25}
},
(3, 4): {"color": RED, "tip_config": {"tip_length": 0.25, "tip_width": 0.25}},
}

g = DiGraph(
Expand Down

0 comments on commit 8e01cc8

Please sign in to comment.