PyChecker "self is argument in staticmethod"

Discussion in 'Python' started by Olaf Meding, Nov 18, 2004.

  1. Olaf Meding

    Olaf Meding Guest

    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
     
    Olaf Meding, Nov 18, 2004
    #1
    1. Advertisements

  2. Olaf Meding

    Peter Hansen Guest

    Olaf Meding wrote:
    > 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
     
    Peter Hansen, Nov 18, 2004
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    16
    Views:
    726
  2. Tim Peters

    RE: PyChecker work with Python 2.3?

    Tim Peters, Aug 3, 2003, in forum: Python
    Replies:
    1
    Views:
    475
    John Machin
    Aug 4, 2003
  3. Pedro Werneck
    Replies:
    0
    Views:
    578
    Pedro Werneck
    Aug 18, 2003
  4. F. GEIGER
    Replies:
    0
    Views:
    358
    F. GEIGER
    Oct 19, 2003
  5. Neal Norwitz
    Replies:
    1
    Views:
    330
    Edward K. Ream
    Dec 2, 2003
  6. Kylotan

    Pychecker under Windows

    Kylotan, Nov 26, 2003, in forum: Python
    Replies:
    10
    Views:
    1,213
    Harald Massa
    Dec 3, 2003
  7. Jp Calderone

    Supressing PyChecker warnings

    Jp Calderone, Jan 16, 2004, in forum: Python
    Replies:
    1
    Views:
    563
    Rene Pijlman
    Jan 16, 2004
  8. Replies:
    4
    Views:
    1,539
    Skip Montanaro
    Apr 28, 2004
Loading...