Skip to content

Commit 8dac45e

Browse files
committed
docs: use modern type annotations
1 parent 588d5e5 commit 8dac45e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ To actually mimic the parsing done by `parse_url_encoded_dict` we will need a ut
122122
from collections import defaultdict
123123
from contextlib import suppress
124124
from json import loads, JSONDecodeError
125-
from typing import Any, DefaultDict, Dict, list
125+
from typing import Any
126126
from urllib.parse import parse_qsl
127127

128128

129-
def parse_url_encoded_form_data(encoded_data: bytes) -> Dict[str, Any]:
129+
def parse_url_encoded_form_data(encoded_data: bytes) -> dict[str, Any]:
130130
"""Parse an url encoded form data into dict of parsed values"""
131-
decoded_dict: DefaultDict[str, list[Any]] = defaultdict(list)
131+
decoded_dict: defaultdict[str, list[Any]] = defaultdict(list)
132132
for k, v in parse_qsl(encoded_data.decode(), keep_blank_values=True):
133133
with suppress(JSONDecodeError):
134134
v = loads(v) if isinstance(v, str) else v

0 commit comments

Comments
 (0)