mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
[zipfile] Move protocol behind version gate (#10036)
This protocol is only used for our Python 3.8 stubs. Therefore it's best to limit its availability as much as possible.
This commit is contained in:
@@ -222,10 +222,11 @@ class ZipInfo:
|
||||
def is_dir(self) -> bool: ...
|
||||
def FileHeader(self, zip64: bool | None = None) -> bytes: ...
|
||||
|
||||
class _PathOpenProtocol(Protocol):
|
||||
def __call__(self, mode: _ReadWriteMode = "r", pwd: bytes | None = ..., *, force_zip64: bool = ...) -> IO[bytes]: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
if sys.version_info < (3, 9):
|
||||
class _PathOpenProtocol(Protocol):
|
||||
def __call__(self, mode: _ReadWriteMode = "r", pwd: bytes | None = ..., *, force_zip64: bool = ...) -> IO[bytes]: ...
|
||||
|
||||
class Path:
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user