Skip to content

False positive not-an-iterable for first argument staticmethod in metaclass #3032

@ifinik

Description

@ifinik

Steps to reproduce

Save the following into a file and run pylint over it:

class My(type): @staticmethod def test(args): """ Non-iterable value args is used in an iterating contextpylint(not-an-iterable) """ # \|/ for i in args: print(i) 

Current behavior

A not-an-iterable error is being emitted for correct code:
a.py:4:17: E1133: Non-iterable value args is used in an iterating context (not-an-iterable)

Expected behavior

No error should be emitted

pylint --version output

pylint 2.3.1
astroid 2.2.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions