Skip to content

Commit 2bc5fcf

Browse files
committed
Revert "Numpy ufunc methods are also inferred as Uninferable"
This reverts commit b699ebb. The fixes to context.path also appears to stop returning Uninferable for numpy ufuncs.
1 parent f581d93 commit 2bc5fcf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/unittest_brain_numpy_core_umath.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ def test_numpy_core_umath_functions_return_type(self):
220220
with self.subTest(typ=func_):
221221
inferred_values = list(self._inferred_numpy_func_call(func_))
222222
self.assertTrue(
223-
len(inferred_values) == 1
224-
or len(inferred_values) == 2
225-
and inferred_values[-1].pytype() is util.Uninferable,
223+
len(inferred_values) == 1,
226224
msg="Too much inferred values ({}) for {:s}".format(
227225
inferred_values[-1].pytype(), func_
228226
),

tests/unittest_regrtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_numpy_crash(self):
9999
astroid = builder.string_build(data, __name__, __file__)
100100
callfunc = astroid.body[1].value.func
101101
inferred = callfunc.inferred()
102-
self.assertEqual(len(inferred), 2)
102+
self.assertEqual(len(inferred), 1)
103103

104104
def test_nameconstant(self):
105105
# used to fail for Python 3.4

0 commit comments

Comments
 (0)