diff options
| author | hippo91 <guillaume.peillex@gmail.com> | 2021-03-05 15:36:42 +0100 |
|---|---|---|
| committer | hippo91 <guillaume.peillex@gmail.com> | 2021-03-05 15:36:42 +0100 |
| commit | a4eaa7f3f90c9d1521133a9da6e74020e855c25e (patch) | |
| tree | 987b1da6d4a81873b79e8e796ee54fbccaeb3203 | |
| parent | 09774f6f6a501b08b99f35cd85900d131a3adf16 (diff) | |
| download | astroid-git-a4eaa7f3f90c9d1521133a9da6e74020e855c25e.tar.gz | |
"import numpy" has to be detected as a valid import of numpy
| -rw-r--r-- | astroid/brain/brain_numpy_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/brain/brain_numpy_utils.py b/astroid/brain/brain_numpy_utils.py index 7bdec5b1..f3058b4b 100644 --- a/astroid/brain/brain_numpy_utils.py +++ b/astroid/brain/brain_numpy_utils.py @@ -33,7 +33,7 @@ def _is_a_numpy_module(node: astroid.node_classes.Name) -> bool: x for x in node.lookup(module_nickname)[1] if isinstance(x, astroid.Import) ] for target in potential_import_target: - if ("numpy", module_nickname) in target.names: + if ("numpy", module_nickname) in target.names or ("numpy", None) in target.names: return True return False |
