Skip to content

Commit

Permalink
Fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulero committed Dec 30, 2024
1 parent eb710bb commit 97f814f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/adam/model/tree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import dataclasses
from typing import Iterable, Union
from typing import Generator, Iterable, Union

from adam.model.abc_factories import Joint, Link

Expand Down Expand Up @@ -136,7 +136,7 @@ def get_node_from_name(self, name: str) -> Node:
"""
return self.graph[name]

def __iter__(self) -> Node:
def __iter__(self) -> Generator[Node]:
"""This method allows to iterate on the model
Returns:
Node: the node istance
Expand All @@ -146,7 +146,7 @@ def __iter__(self) -> Node:
"""
yield from [self.graph[name] for name in self.ordered_nodes_list]

def __reversed__(self) -> Node:
def __reversed__(self) -> Generator[Node]:
"""
Returns:
Node
Expand Down

0 comments on commit 97f814f

Please sign in to comment.