Files
openide/python/testData/refactoring/changeSignature/otherDunderInitInHierarchyNotModified.before.py
Mikhail Golubev 8487b4cf70 PY-22023 Don't try to update subclasses' constructors in Change Signature
Accordingly, don't ask to modify "overridden" constructor of a base class.
Unlike other methods, constructors in the hierarchy usually don't mean to
have identical signatures, thus it's not safe to blindly sync them this way.

GitOrigin-RevId: 61e300914831c726afea3928acd110fea8428df8
2020-04-17 12:46:38 +00:00

15 lines
262 B
Python

class Super:
def __init__(self):
pass
class Target(Super):
def __<caret>init__(self, foo):
super().__init__()
print(foo)
class Sub(Target):
def __init__(self, foo, extra):
super().__init__(foo)
print(extra)