R0902

Message

Too many instance attributes (%s/%s)

Description

Used when a class instance has more than 7 local variables defined.

Explanation

As seen on this comment on stackoverflow: https://stackoverflow.com/a/24434901/469322
It can be disabled locally with a comment on class level:

class SomeClass(object):
    # pylint: disable=too-many-instance-attributes
    def __init__(self):
        ...

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License