diff options
author | Dani Alcala <112832187+clavedeluna@users.noreply.github.com> | 2023-02-07 17:42:22 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 21:42:22 +0100 |
commit | f690448ac030377d2d71d2866d32c40dd7f4bbea (patch) | |
tree | 3eaeb05840cf43a4c89f23dec871186b49ba3f15 /pylint/checkers | |
parent | 70f7e3af68cb9e4878f6bc8c7da3de32c714d0a0 (diff) | |
download | pylint-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.py | 2 |
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: |