Files
openide/python/testData/inspections/PyFinalInspection/overloadedFinalMethodInStub.pyi
Semyon Proshev b5fe834814 Warn incorrect usages of @overload and @final (PEP 591) (PY-34945)
GitOrigin-RevId: fd9c3acc6b67d9ac1c46512573df3e936c683e29
2019-07-02 06:52:16 +03:00

19 lines
391 B
Python

from typing import overload
from typing_extensions import final
class A:
@final
@overload
def foo(self, a: int) -> int: ...
@overload
def foo(self, a: str) -> str: ...
class B:
@overload
def foo(self, a: int) -> int: ...
@final
@overload
def <warning descr="'@final' should be placed on the first overload">foo</warning>(self, a: str) -> str: ...