Skip to content

Commit 435bdcb

Browse files
committed
Remove @type_check_only from types with aliases available at runtime
1 parent 23e7650 commit 435bdcb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

stdlib/asyncio/events.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,9 @@ class AbstractEventLoop:
600600
@abstractmethod
601601
async def shutdown_default_executor(self) -> None: ...
602602

603-
@type_check_only
603+
# This class does not exist at runtime, but stubtest complains if it's marked as
604+
# @type_check_only because it has an alias that does exist at runtime. See mypy#19568.
605+
# @type_check_only
604606
class _AbstractEventLoopPolicy:
605607
@abstractmethod
606608
def get_event_loop(self) -> AbstractEventLoop: ...

stdlib/builtins.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,8 +1340,10 @@ class property:
13401340
def __set__(self, instance: Any, value: Any, /) -> None: ...
13411341
def __delete__(self, instance: Any, /) -> None: ...
13421342

1343+
# This class does not exist at runtime, but stubtest complains if it's marked as
1344+
# @type_check_only because it has an alias that does exist at runtime. See mypy#19568.
1345+
# @type_check_only
13431346
@final
1344-
@type_check_only
13451347
class _NotImplementedType(Any):
13461348
__call__: None
13471349

0 commit comments

Comments
 (0)