Pretty much all python methods should have "self" as their first argument. One key exception, however, is __new__. This special method is supposed to have "cls" as its first argument, since it operates on a class rather than an instance.
However, when __new__ is properly given "cls" as its first argument, kdev-python incorrectly labels this as a problem and says that it should be "self".
Steps to Reproduce:
1. Create a class
2. Create a "__new__" method
3. make "cls" the first argument of the __new__method
kdev-python says it should be "self"
kdev-python finds no error.
kdev-python really should label it as a problem if anything other than "cls" is the first argument in the __new__ method.
Git commit 43f49dd95d5ac85f6757b4e897e43723e0881480 by Sven Brauch, on behalf of Levente Kurusa.
Committed on 26/11/2013 at 21:26.
Pushed by brauch into branch 'master'.
Fix warning if __new__ argument is called cls, not self
This patch fixes a warning on __new__ method argument complaining about
the usage of self instead of cls.
M +19 -6 duchain/declarationbuilder.cpp
M +21 -0 duchain/tests/pyduchaintest.cpp
M +2 -0 duchain/tests/pyduchaintest.h