#2479: W0212 "ethod could be a function" false positive [resolved]
#2479 - latest update on 2007/02/19, created on 2006/10/13
| priority | normal |
| type | bug |
| cost | 1 |
W0212, Method could be a function shouldn't be emitted in case like (factory method pattern)
class XA: pass
class XB(XA): pass
class XC(XA): pass
class A:
def MakeX(self):
return XA()
class B(A):
def MakeX(self):
return XB()
class C(A):
def MakeX(self):
return XC()
| | |
| validation pending | resolved | check
| 2007/06/08 |
| open | validation pending | pylint is already doing its best by only emitting this message (renamed to R0201 since) for classes overriding a parent method, so in this example it will be issued only for the A class. Now its easy to disable this message as well by explicitly using "# pylint: disable-msg=R0201" in the A class.
| 2007/02/19 |