Remove write modes from importlib.resources.abc.Traversable (#11124)

This commit is contained in:
Paul Ganssle
2023-12-09 23:38:40 -05:00
committed by GitHub
parent 45b1db9f8e
commit 336c062489

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"] = "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"]) -> IO[bytes]: ...
@property
@abstractmethod
def name(self) -> str: ...