Files
openide/python/testData/refactoring/inlineFunction/removeTypingOverrides/main.py
Aleksei Kniazev f6c70470d6 IDEA-CR-49176: function inline: remove typing overloads together with the function (PY-36465)
GitOrigin-RevId: ef532069cd2d8bb06b35fb7d6ef7be2563b9b76d
2019-07-08 18:05:36 +03:00

23 lines
378 B
Python

from typing import overload
class MyClass:
def __init__(self, my_val):
self.my_val = my_val
@overload
def method(self, x: int) -> int:
pass
@overload
def method(self, x: str) -> str:
pass
def method(self, x):
print(self.my_val)
print(x)
return x
my_class = MyClass(1)
res = my_class.met<caret>hod(2)