mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +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 io
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Callable, Container, Iterable, Sequence
|
||||
from typing import Any, Final, Literal, Protocol, TypeVar, overload
|
||||
from typing import Any, Final, Literal, Protocol, TypeVar, overload, type_check_only
|
||||
|
||||
__all__ = [
|
||||
"NullTranslations",
|
||||
@@ -26,6 +26,7 @@ __all__ = [
|
||||
if sys.version_info < (3, 11):
|
||||
__all__ += ["bind_textdomain_codeset", "ldgettext", "ldngettext", "lgettext", "lngettext"]
|
||||
|
||||
@type_check_only
|
||||
class _TranslationsReader(Protocol):
|
||||
def read(self) -> bytes: ...
|
||||
# optional:
|
||||
|
||||
Reference in New Issue
Block a user