summaryrefslogtreecommitdiff
path: root/pylint/checkers
diff options
context:
space:
mode:
authorDani Alcala <112832187+clavedeluna@users.noreply.github.com>2023-02-07 17:42:22 -0300
committerGitHub <noreply@github.com>2023-02-07 21:42:22 +0100
commitf690448ac030377d2d71d2866d32c40dd7f4bbea (patch)
tree3eaeb05840cf43a4c89f23dec871186b49ba3f15 /pylint/checkers
parent70f7e3af68cb9e4878f6bc8c7da3de32c714d0a0 (diff)
downloadpylint-git-f690448ac030377d2d71d2866d32c40dd7f4bbea.tar.gz
Fix no-name-in-module when variable is same as module name (#8169)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/checkers')
-rw-r--r--pylint/checkers/variables.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index cacf20e53..0d91c6771 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -2944,7 +2944,7 @@ class VariablesChecker(BaseChecker):
break
try:
module = next(module.getattr(name)[0].infer())
- if module is astroid.Uninferable:
+ if not isinstance(module, nodes.Module):
return None
except astroid.NotFoundError:
if module.name in self._ignored_modules: