typing.pyi: IO.name may be bytes (#10738)

This commit is contained in:
Jelle Zijlstra
2023-09-19 23:24:22 -07:00
committed by GitHub
parent aef4fa8756
commit 31495e53bd

View File

@@ -709,8 +709,10 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
# See #8726
@property
def mode(self) -> str: ...
# Usually str, but may be bytes if a bytes path was passed to open(). See #10737.
# If PEP 696 becomes available, we may want to use a defaulted TypeVar here.
@property
def name(self) -> str: ...
def name(self) -> str | Any: ...
@abstractmethod
def close(self) -> None: ...
@property