Skip to content

Commit

Permalink
πŸ› FIX: typing failure (#4700)
Browse files Browse the repository at this point in the history
As of numpy v1.20, `numpy.inf` is no longer recognised as an integer type
  • Loading branch information
chrisjsewell committed Feb 1, 2021
1 parent a490fe0 commit 48fa475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiida/tools/graph/graph_traversers.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def traverse_graph(
# pylint: disable=too-many-locals,too-many-statements,too-many-branches

if max_iterations is None:
max_iterations = inf
max_iterations = cast(int, inf)
elif not (isinstance(max_iterations, int) or max_iterations is inf):
raise TypeError('Max_iterations has to be an integer or infinity')

Expand Down

0 comments on commit 48fa475

Please sign in to comment.