Skip to content

Commit 34426db

Browse files
authored
Change get_cache_token to return a NewType in _py_abc (#6872)
1 parent da3292d commit 34426db

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stdlib/_py_abc.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from typing import Any, TypeVar
1+
from typing import Any, NewType, TypeVar
22

33
_T = TypeVar("_T")
44

5-
# TODO: Change the return into a NewType bound to int after pytype/#597
6-
def get_cache_token() -> object: ...
5+
_CacheToken = NewType("_CacheToken", int)
6+
7+
def get_cache_token() -> _CacheToken: ...
78

89
class ABCMeta(type):
910
def __new__(__mcls, __name: str, __bases: tuple[type[Any], ...], __namespace: dict[str, Any]) -> ABCMeta: ...

0 commit comments

Comments
 (0)