pylint #103656 False positive W0231 for missing object.__init__ [validation pending]
In some cases, pylint raise W0231 (__init__ method from base class %r is not called) when base class for __init__ is object. FE: class NoInit(object): """No __init__ defined""" class Init(NoInit): """Don't complain for not calling the super __init__""" def __init__(self, arg): self.arg = arg Confirmed on Mac OS X, with last pylint/logilab-astng versions. Proposed patch attached. From http://lists.logilab.org/pipermail/python-projects/2012-August/003225.html | |
priority | normal |
---|---|
type | bug |
done in | 0.26.0 |
load left | 0.000 |
closed by | #1a27a3d9ea5e Fix false positive W0231 for missing call to object.__init__. Closes #103656 |
attachment
Comments
-
2012/12/17 09:48, written by anon
add commentThe same bug appears in my code.
Env:
pylint 0.25.1,
astng 0.23.1, common 0.58.0
Python 2.7.3 (default, Sep 9 2012, 17:41:34)
[GCC 4.7.1]