mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-25 01:38:40 +08:00
Remove Python 3.7 branches (#11238)
This commit is contained in:
@@ -3,12 +3,8 @@ from typing_extensions import Final, TypeAlias
|
||||
|
||||
# NOTE: Can't specify numpy as a dependency because openpyxl doesn't declare it as one
|
||||
# import numpy
|
||||
# if sys.version_info >= (3, 8):
|
||||
# import numpy._typing
|
||||
|
||||
# _NBitBase: TypeAlias = numpy._typing.NBitBase
|
||||
# else:
|
||||
# _NBitBase: TypeAlias = Any
|
||||
# import numpy._typing
|
||||
# _NBitBase: TypeAlias = numpy._typing.NBitBase
|
||||
# _NumericTypes: TypeAlias = int | float | Decimal | numpy.bool_ | numpy.floating[_NBitBase] | numpy.integer[_NBitBase]
|
||||
|
||||
_NumericTypes: TypeAlias = int | float | Decimal
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# This file does not exist at runtime. It is a helper file to overload imported functions in openpyxl.xml.functions
|
||||
|
||||
import sys
|
||||
from _typeshed import Incomplete, ReadableBuffer
|
||||
from collections.abc import Iterable, Iterator, Mapping, Sequence
|
||||
from typing import Any, Protocol, TypeVar, overload
|
||||
@@ -86,20 +85,15 @@ def fromstring(text: str, forbid_dtd: bool = False, forbid_entities: bool = True
|
||||
|
||||
# from xml.etree.ElementTree import tostring
|
||||
# But made partial, removing encoding arg
|
||||
if sys.version_info >= (3, 8):
|
||||
@overload
|
||||
def tostring(
|
||||
element: Element,
|
||||
method: str | None = "xml",
|
||||
*,
|
||||
xml_declaration: bool | None = None,
|
||||
default_namespace: str | None = ...,
|
||||
short_empty_elements: bool = ...,
|
||||
) -> str: ...
|
||||
|
||||
else:
|
||||
@overload
|
||||
def tostring(element: Element, method: str | None = ..., *, short_empty_elements: bool = ...) -> str: ...
|
||||
@overload
|
||||
def tostring(
|
||||
element: Element,
|
||||
method: str | None = "xml",
|
||||
*,
|
||||
xml_declaration: bool | None = None,
|
||||
default_namespace: str | None = ...,
|
||||
short_empty_elements: bool = ...,
|
||||
) -> str: ...
|
||||
|
||||
# from lxml.etree import Element
|
||||
# But made partial, removing encoding arg
|
||||
|
||||
Reference in New Issue
Block a user