mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Change get_cache_token to return a NewType in _py_abc (#6872)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
from typing import Any, TypeVar
|
||||
from typing import Any, NewType, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
# TODO: Change the return into a NewType bound to int after pytype/#597
|
||||
def get_cache_token() -> object: ...
|
||||
_CacheToken = NewType("_CacheToken", int)
|
||||
|
||||
def get_cache_token() -> _CacheToken: ...
|
||||
|
||||
class ABCMeta(type):
|
||||
def __new__(__mcls, __name: str, __bases: tuple[type[Any], ...], __namespace: dict[str, Any]) -> ABCMeta: ...
|
||||
|
||||
Reference in New Issue
Block a user