File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -905,8 +905,9 @@ def f(a, *args): ...
905905 def test_decorated_overload (self ) -> Iterator [Case ]:
906906 yield Case (
907907 stub = """
908- from typing import overload
908+ from typing import overload, type_check_only
909909
910+ @type_check_only
910911 class _dec1:
911912 def __init__(self, func: object) -> None: ...
912913 def __call__(self, x: str) -> str: ...
@@ -922,6 +923,7 @@ def good1(unrelated: int, whatever: str) -> str: ...
922923 )
923924 yield Case (
924925 stub = """
926+ @type_check_only
925927 class _dec2:
926928 def __init__(self, func: object) -> None: ...
927929 def __call__(self, x: str, y: int) -> str: ...
@@ -937,6 +939,7 @@ def good2(unrelated: int, whatever: str) -> str: ...
937939 )
938940 yield Case (
939941 stub = """
942+ @type_check_only
940943 class _dec3:
941944 def __init__(self, func: object) -> None: ...
942945 def __call__(self, x: str, y: int) -> str: ...
You can’t perform that action at this time.
0 commit comments