Fix linting issues (#12898)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alex Waygood
2024-10-24 14:26:37 +01:00
committed by GitHub
parent 783171b9f7
commit 9ed47fa8ec
5 changed files with 8 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
from typing import Literal, Final
from typing import Final, Literal
AF_12844: Final[int]
AF_APPLETALK: Final[int]

View File

@@ -304,15 +304,9 @@ with_descriptors.text_int_not_none = "0"
with_descriptors.text_int_not_none = None # type: ignore
with_descriptors.text_int_not_none = object() # type: ignore
# If expected type (_T) is not str, it's impossible to use an Element as the value
with_descriptors.text_int_not_none = cast( # type: ignore
_HasTagAndGet[int], _
)
with_descriptors.text_int_not_none = cast( # type: ignore
_HasTagAndGet[None], _
)
with_descriptors.text_int_not_none = cast( # type: ignore
_HasTagAndGet[str], _
)
with_descriptors.text_int_not_none = cast(_HasTagAndGet[int], _) # type: ignore
with_descriptors.text_int_not_none = cast(_HasTagAndGet[None], _) # type: ignore
with_descriptors.text_int_not_none = cast(_HasTagAndGet[str], _) # type: ignore
with_descriptors.text_int_none = 0
with_descriptors.text_int_none = "0"
@@ -336,9 +330,7 @@ with_descriptors.minmax_float = 0.0
with_descriptors.minmax_float = None # type: ignore
with_descriptors.minmax_float = object() # type: ignore
with_descriptors.minmax_float = cast(_HasTagAndGet[float], _)
with_descriptors.minmax_float = cast( # type: ignore
_HasTagAndGet[None], _
)
with_descriptors.minmax_float = cast(_HasTagAndGet[None], _) # type: ignore
with_descriptors.minmax_float = cast(_HasTagAndGet[object], _) # type: ignore
with_descriptors.minmax_float_none = 0