stdlib: Use pos-only parameters for many Protocols (#10985)

This commit is contained in:
Jelle Zijlstra
2023-11-06 09:09:04 -08:00
committed by GitHub
parent a5c1a4cd3f
commit 5030b7419b
9 changed files with 14 additions and 14 deletions

View File

@@ -138,10 +138,10 @@ if sys.version_info >= (3, 9):
# which is not the case.
@overload
@abstractmethod
def open(self, mode: Literal["r", "w"] = "r", *, encoding: str | None = None, errors: str | None = None) -> IO[str]: ...
def open(self, __mode: Literal["r", "w"] = "r", *, encoding: str | None = None, errors: str | None = None) -> IO[str]: ...
@overload
@abstractmethod
def open(self, mode: Literal["rb", "wb"]) -> IO[bytes]: ...
def open(self, __mode: Literal["rb", "wb"]) -> IO[bytes]: ...
@property
@abstractmethod
def name(self) -> str: ...