Skip to content

Commit 91b6a6e

Browse files
committed
Update a type hint to account for an error case
1 parent 4408212 commit 91b6a6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

polytracker/cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def roots(self) -> Collection[N]:
4949
self._roots = tuple(self._find_roots())
5050
return self._roots
5151

52-
def depth(self, node: N) -> int:
52+
def depth(self, node: N) -> Union[int, float]:
5353
return min(self.path_length(root, node) for root in self.roots)
5454

5555
def ancestors(self, node: N) -> Set[N]:

0 commit comments

Comments
 (0)