diff options
author | Antonio <antonio@zoftko.com> | 2024-04-04 00:43:40 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 08:43:40 +0200 |
commit | 7a3b482b9673243d2ccc895672eb1e452f5daa82 (patch) | |
tree | 875a1f978dfaadbc5fec1e6936c1024004e3444b | |
parent | de942f3076ff3d1263b1e598c89a6bb31e4a27ea (diff) | |
download | astroid-upstream-main.tar.gz |
Correct pre-commit's pylint warnings (#2407)upstream-main
The introduction of use-yield-from generated a new warning on the source
code. Some messages no longer needed to be disabled as well. These
warnings have been corrected to prevent pre-commit from failing.
---------
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
-rw-r--r-- | astroid/manager.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/astroid/manager.py b/astroid/manager.py index 4ef3e828..a7a51f19 100644 --- a/astroid/manager.py +++ b/astroid/manager.py @@ -309,7 +309,6 @@ class AstroidManager: modname.split("."), context_file=contextfile ) except ImportError as e: - # pylint: disable-next=redefined-variable-type value = AstroidImportError( "Failed to import module {modname} with error:\n{error}.", modname=modname, @@ -406,8 +405,7 @@ class AstroidManager: # take care, on living object __module__ is regularly wrong :( modastroid = self.ast_from_module_name(modname) if klass is obj: - for inferred in modastroid.igetattr(name, context): - yield inferred + yield from modastroid.igetattr(name, context) else: for inferred in modastroid.igetattr(name, context): yield inferred.instantiate_class() |