mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-29 15:16:54 +08:00
typing.pyi: IO.name may be bytes (#10738)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user