Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct pre-commit's pylint warnings #2407

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions astroid/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ def file_from_module_name(
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,
Expand Down Expand Up @@ -406,8 +405,7 @@ def infer_ast_from_something(
# 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()
Expand Down
2 changes: 0 additions & 2 deletions astroid/nodes/scoped_nodes/scoped_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1557,8 +1557,6 @@ def infer_yield_result(self, context: InferenceContext | None = None):
:returns: What the function yields
:rtype: iterable(NodeNG or Uninferable) or None
"""
# pylint: disable=not-an-iterable
# https://github.com/pylint-dev/astroid/issues/1015
for yield_ in self.nodes_of_class(node_classes.Yield):
Pierre-Sassoulas marked this conversation as resolved.
Show resolved Hide resolved
if yield_.value is None:
const = node_classes.Const(None)
Expand Down
Loading