mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
xml.etree: use _typeshed (#4221)
This commit is contained in:
@@ -19,6 +19,7 @@ from typing import (
|
||||
Union,
|
||||
overload,
|
||||
)
|
||||
from _typeshed import AnyPath, FileDescriptor
|
||||
import sys
|
||||
from typing_extensions import Literal
|
||||
|
||||
@@ -56,11 +57,7 @@ else:
|
||||
# _fixtext function in the source). Client code knows best:
|
||||
_str_result_type = Any
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
from os import PathLike
|
||||
_file_or_filename = Union[str, bytes, PathLike[str], int, IO[Any]]
|
||||
else:
|
||||
_file_or_filename = Union[str, bytes, int, IO[Any]]
|
||||
_file_or_filename = Union[AnyPath, FileDescriptor, IO[Any]]
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
class _Writeable(Protocol):
|
||||
|
||||
Reference in New Issue
Block a user