mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
Mark stub-only private symbols as @type_check_only in third-party stubs (#14545)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import datetime
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import Literal, NamedTuple, TypedDict, overload
|
||||
from typing import Literal, NamedTuple, TypedDict, overload, type_check_only
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
from docker._types import ContainerWeightDevice, WaitContainerResponse
|
||||
@@ -13,6 +13,7 @@ from docker.types.services import Mount
|
||||
from .images import Image
|
||||
from .resource import Collection, Model
|
||||
|
||||
@type_check_only
|
||||
class _RestartPolicy(TypedDict):
|
||||
MaximumRetryCount: NotRequired[int]
|
||||
Name: NotRequired[Literal["always", "on-failure"]]
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
from collections.abc import Sequence
|
||||
from typing import TypedDict
|
||||
from typing import TypedDict, type_check_only
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
@type_check_only
|
||||
class _ProxyConfigDict(TypedDict):
|
||||
http: NotRequired[str]
|
||||
https: NotRequired[str]
|
||||
ftpProxy: NotRequired[str]
|
||||
noProxy: NotRequired[str]
|
||||
|
||||
@type_check_only
|
||||
class _Environment(TypedDict):
|
||||
http_proxy: NotRequired[str]
|
||||
HTTP_PROXY: NotRequired[str]
|
||||
|
||||
Reference in New Issue
Block a user