Remove Python 3.7 branches (#11238)

This commit is contained in:
Sebastian Rittau
2024-01-05 11:39:39 +01:00
committed by GitHub
parent 4e62577002
commit 23604858a6
122 changed files with 1952 additions and 3800 deletions
+2 -6
View File
@@ -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