Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#296 instace method identified as classmethod

open
nobody
None
5
2011-06-06
2011-06-06
Anonymous
No

0.8.17

This is related to existing tracked issues: 448769, 555771, (perhaps more)
This reproduction was slightly simpler, or in a more recent version.

The following code gives these two spurious warnings

pychecker_noclass.py:7: ['cls', 'klass'] is not first classmethod argument
pychecker_noclass.py:8: No class attribute (bar) found

<pre>
#!/usr/bin/env python
#
# Related: 448769, 555771

class A:
def __init__(self):
self.bar = True

def foo(self):
print self.bar

class B:
a = A()
foo = a.foo

if __name__ == '__main__':
B.foo()
</pre>

Discussion