mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
Add @type_check_only to various typeshed-only procotols in stdlib (#14465)
Mark various typeshed-only protocols as `@type_check_only` in stdlib
This commit is contained in:
+2
-1
@@ -2,7 +2,7 @@ import sys
|
||||
from _typeshed import SupportsWrite, sentinel
|
||||
from collections.abc import Callable, Generator, Iterable, Sequence
|
||||
from re import Pattern
|
||||
from typing import IO, Any, ClassVar, Final, Generic, NoReturn, Protocol, TypeVar, overload
|
||||
from typing import IO, Any, ClassVar, Final, Generic, NoReturn, Protocol, TypeVar, overload, type_check_only
|
||||
from typing_extensions import Self, TypeAlias, deprecated
|
||||
|
||||
__all__ = [
|
||||
@@ -112,6 +112,7 @@ class _ActionsContainer:
|
||||
def _handle_conflict_error(self, action: Action, conflicting_actions: Iterable[tuple[str, Action]]) -> NoReturn: ...
|
||||
def _handle_conflict_resolve(self, action: Action, conflicting_actions: Iterable[tuple[str, Action]]) -> None: ...
|
||||
|
||||
@type_check_only
|
||||
class _FormatterClass(Protocol):
|
||||
def __call__(self, *, prog: str) -> HelpFormatter: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user