Skip to content

Commit

Permalink
Fix Python 3.9 incompatibility caused by type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hamann committed Jun 9, 2024
1 parent 7384d79 commit 2a9e112
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions desec.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@
"TXT",
"URI",
]
JsonGenericType = (
None
| int
| float
| str
| bool
| t.Sequence["JsonGenericType"]
| t.Mapping[str, "JsonGenericType"]
)
JsonGenericType = t.Union[
None,
int,
float,
str,
bool,
t.Sequence["JsonGenericType"],
t.Mapping[str, "JsonGenericType"],
]


class JsonTokenType(t.TypedDict):
Expand Down Expand Up @@ -495,7 +495,7 @@ def query(
"""
if method == "GET" or method == "DELETE":
params = t.cast(t.Mapping[str, str | int | float | bool | None] | None, data)
params = t.cast("t.Mapping[str, str | int | float | bool | None] | None", data)
body = None
else:
params = None
Expand Down

0 comments on commit 2a9e112

Please sign in to comment.