From 48fa47584c993cdac019c6199bc045a4c19da152 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Mon, 1 Feb 2021 16:58:01 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20FIX:=20typing=20failure=20(#4700?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of numpy v1.20, `numpy.inf` is no longer recognised as an integer type --- aiida/tools/graph/graph_traversers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiida/tools/graph/graph_traversers.py b/aiida/tools/graph/graph_traversers.py index 209f22bbc5..c731a4a672 100644 --- a/aiida/tools/graph/graph_traversers.py +++ b/aiida/tools/graph/graph_traversers.py @@ -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')