Skip to content

Commit 1c0a669

Browse files
committed
Fix exception when calling a function imported from a wildcard
Fixes #508
1 parent d12eccb commit 1c0a669

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

autoapi/_astroid_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,13 @@ def get_assign_value(
228228
else:
229229
return None
230230

231-
value = next(target.infer())
232-
if value is astroid.util.Uninferable:
231+
try:
232+
value = next(target.infer())
233+
except astroid.InferenceError:
233234
value = None
235+
else:
236+
if value is astroid.util.Uninferable:
237+
value = None
234238

235239
return (name, value)
236240

docs/changes/508.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix exception when calling a function imported from a wildcard
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from ..subpackage import *
2+
3+
FIVE = public_chain()

0 commit comments

Comments
 (0)