Skip to content

Commit

Permalink
Fixed return type annotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
senthurayyappan committed Nov 11, 2024
1 parent a5fec5f commit 434f695
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions onshape_api/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def create_graph(
instances: dict[str, Union[PartInstance, AssemblyInstance]],
parts: dict[str, Part],
mates: dict[str, MateFeatureData],
) -> Union[nx.Graph, nx.DiGraph]:
) -> tuple[nx.DiGraph, str]:
"""
Create a graph from onshape assembly data.
Expand All @@ -126,7 +126,6 @@ def create_graph(
instances: Dictionary of instances in the assembly.
parts: Dictionary of parts in the assembly.
mates: Dictionary of mates in the assembly.
directed: Whether the graph should be directed or not.
Returns:
The graph created from the assembly data.
Expand All @@ -139,7 +138,7 @@ def create_graph(
>>> create_graph(occurences, instances, parts, mates, directed=True)
"""

graph = nx.Graph()
graph: nx.Graph = nx.Graph()

for occurence in occurences:
if instances[occurence].type == InstanceType.PART:
Expand Down

0 comments on commit 434f695

Please sign in to comment.