Skip to content

Commit

Permalink
Label NxGraph as a TypeAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil-42 authored Feb 5, 2024
1 parent f32985d commit 4ce3fe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manim/mobject/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import itertools as it
from copy import copy
from typing import Any, Hashable, Iterable, Literal, Protocol, Union, cast
from typing_extensions import TypeAlias

import networkx as nx
import numpy as np
Expand All @@ -26,7 +27,7 @@
from manim.typing import Point3D
from manim.utils.color import BLACK

NxGraph = Union[nx.classes.graph.Graph, nx.classes.digraph.DiGraph]
NxGraph: TypeAlias = Union[nx.classes.graph.Graph, nx.classes.digraph.DiGraph]


class LayoutFunction(Protocol):
Expand Down

0 comments on commit 4ce3fe0

Please sign in to comment.