Skip to content

Commit

Permalink
Fix type annotation of LineageHandler to accept None as distance …
Browse files Browse the repository at this point in the history
…argument
  • Loading branch information
althonos committed Jul 18, 2020
1 parent bc4cf7b commit a8f731a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pronto/logic/lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def __eq__(self, other: object) -> bool:

class LineageHandler(Iterable["Term"]):

def __init__(self, term: "Term", distance: int, with_self: Optional[int]):
def __init__(self, term: "Term", distance: Optional[int], with_self: Optional[int]):
self.term = term
self.distance = distance
self.with_self = with_self
# API compatibilty with previous iterator
# TODO: API compatibilty with previous iterator (remove for v3.0.0)
self._it = None

def __next__(self):
Expand Down

0 comments on commit a8f731a

Please sign in to comment.