pylint #107062 "E1101: %s %r has no %r member" should take a hint from hasattr [open]
In the following code, we take care to check the existence of a dynamic attribute
E: 3,38:A.argh: Instance of 'A' has no 'blurb' member
---- 8< ---- | |
priority | normal |
---|---|
type | bug |
done in | <not specified> |
closed by | <not specified> |
Comments
-
2012/10/05 15:10, written by ydirson
add commentSimilarly, E1102 can trigger, calling something non-callable, when the call is protected by a callable() test:
E: 6,19:A.foo: x is not callable
---- 8< ----
x = None
class A(object):
def foo(self):
if callable(x):
return x(0)
else:
return x