Mark stub-only private symbols as @type_check_only in third-party stubs (#14545)

This commit is contained in:
Brian Schubert
2025-08-08 05:29:48 -04:00
committed by GitHub
parent a358dc24e8
commit 81c8fcb2e6
131 changed files with 334 additions and 147 deletions
+2 -1
View File
@@ -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"]]
+3 -1
View File
@@ -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]