mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
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:
@@ -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>
|
||||
Reference in New Issue
Block a user