mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-02 14:10:23 +08:00
Mark stub-only private symbols as @type_check_only in third-party stubs (#14545)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing import Any, Generic, TypeVar, type_check_only
|
||||
from typing_extensions import Self
|
||||
|
||||
from requests import Response, Session
|
||||
@@ -50,6 +50,7 @@ class Adapter(Generic[_R], metaclass=ABCMeta):
|
||||
self, method, url: str, headers: Mapping[str, str] | None = None, raise_exception: bool = True, **kwargs: Any
|
||||
) -> _R: ...
|
||||
|
||||
@type_check_only
|
||||
class _GenericRawAdapter(Adapter[_R]):
|
||||
def get_login_token(self, response: _R) -> str: ...
|
||||
def request(
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from typing import Any, NoReturn, TypedDict, TypeVar
|
||||
from typing import Any, NoReturn, TypedDict, TypeVar, type_check_only
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
@type_check_only
|
||||
class _DeprecateProperty(TypedDict):
|
||||
to_be_removed_in_version: str
|
||||
client_property: str
|
||||
|
||||
Reference in New Issue
Block a user