Skip to content

Commit

Permalink
fix sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
lucywang000 committed Aug 9, 2021
1 parent 7cdc107 commit 1a81a47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions w3lib/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,13 @@ def any_to_uri(uri_or_path: str) -> str:
).encode()
)

_ParseDataURIResult = namedtuple(
"_ParseDataURIResult", "media_type media_type_parameters data"
ParseDataURIResult = namedtuple(
"ParseDataURIResult", "media_type media_type_parameters data"
)
ParseDataURIResult.__doc__ = "The return value type of `w3lib.url.parse_data_uri`."


def parse_data_uri(uri: StrOrBytes) -> _ParseDataURIResult:
def parse_data_uri(uri: StrOrBytes): # type: ignore
"""
Parse a data: URI, returning a 3-tuple of media type, dictionary of media
Expand Down Expand Up @@ -426,7 +427,7 @@ def parse_data_uri(uri: StrOrBytes) -> _ParseDataURIResult:
raise ValueError("invalid data URI")
data = base64.b64decode(data)

return _ParseDataURIResult(media_type, media_type_params, data)
return ParseDataURIResult(media_type, media_type_params, data)


__all__ = [
Expand Down

0 comments on commit 1a81a47

Please sign in to comment.