PY-20017 Fixed: Unresolved attributes for child class if __new__ is implemented in parent class

For 'self' and 'cls' parameters return containing class as a type
This commit is contained in:
Semyon Proshev
2016-08-02 16:29:59 +03:00
parent 534f2d4bef
commit 893cea67b1
4 changed files with 24 additions and 15 deletions
@@ -0,0 +1,9 @@
class A(object):
@staticmethod
def __new__(cls, *more):
return super(A, cls).__new__(cls, *more)
class B(A):
def test_method(self):
self.test_method()
@@ -0,0 +1,9 @@
class A(object):
@staticmethod
def __new__(cls, *more):
return super(A, cls).__new__(cls, *more)
class B(A):
def test_method(self):
self.test_m<caret>