This is pylint 1.9 on ubuntu lucid. I am inheriting from defaultdict, and in the implementation of my class I use defaultdict methods - they are all declared as non-existant. Example:
from collections import defaultdict
class IntDict(defaultdict):
def __init__(self):
defaultdict.__init__(self, int)
def copy(self):
result = IntDict()
result.update(self)
return result
| |
| priority | normal |
|---|---|
| type | bug |
| appeared in | <not specified> |
| done in | <not specified> |
| closed by | <not specified> |


#23549 pyreverse / inspector : store also class attributes
Comments
-
2010/06/02 16:31, written by anon
| reply to this comment
-
2010/08/03 03:34, written by anon
| reply to this comment
-
2010/08/03 09:27, written by sthenault
| reply to this comment
-
2011/02/15 19:52, written by fabianpijcke
| reply to this comment
(add comment)Same kind of false positive here :
I'm using pyserial-2.5_rc2 with python 2.6.5 on Archlinux
import serial
a = serial.PARITY_NONE
E: 5: Module 'serial' has no 'PARITY_NONE' member
This is obviously false as I'm running this test successfully on my machine.
I get lots of these errors working with Google App Engine. It's pretty frustrating because they overwhelm warnings about real problems. When I do:
I get an error like:
But of course it does. This seems to happen in cases where the module has a __init__.py file with contents like:
and also a deferred.py file:
hum pylint should be able to follow such things. May be the pb is related
to relative import (eg 'from defererred import *' instead of
'from google.appengine.ext.deferred import *').
You can file a specific ticket for this pb.
I don't know if this is pertinent, but I get a E1101 false positive when using "self.__dict__['mykey'] = 'myvalue'" in place of self.mykey = 'myvalue'.
Hope it could help ...