PyChecker "self is argument in staticmethod"

O

Olaf Meding

What does the below PyChecker warning mean?

More importantly, is there a way to suppress it?

PyChecker warning:
..\src\phaseid\integration.py:21: self is argument in staticmethod


My best guess is that the warning is related to PyChecker not
supporting C++ extensions.


Thanks much for your help.

Olaf
 
P

Peter Hansen

Olaf said:
What does the below PyChecker warning mean?

More importantly, is there a way to suppress it?

PyChecker warning:
..\src\phaseid\integration.py:21: self is argument in staticmethod

My best guess is that the warning is related to PyChecker not
supporting C++ extensions.

Sounds like a pretty wild guess to me. ;-)

c:\>c:\a\python23\python.exe
c:\a\python23\Lib\site-packages\pychecker\checker.py test.py
Processing test...

Warnings...

test.py:2: self is argument in staticmethod

c:\>type test.py
class A:
def func(self, blah):
pass

func = staticmethod(func)


Does your code look anything like the above? The warning message
is very explicit about what is wrong here... a staticmethod
should not really have a "self" parameter.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top