Add stubs for datauri

This commit is contained in:
Ellie
2026-02-28 21:02:04 -05:00
committed by GitHub
parent 12944d12ef
commit 944838fc60
3 changed files with 22 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
version = "1.1.*"
upstream_repository = "https://github.com/eclecticiq/python-data-uri"
+1
View File
@@ -0,0 +1 @@
from .datauri import DataURIError as DataURIError, discover as discover, parse as parse
+19
View File
@@ -0,0 +1,19 @@
from collections.abc import Generator
from re import Pattern
from typing import Final
RE_DATA_URI: Final[Pattern[str]] # undocumented
class DataURIError(ValueError): ...
class ParsedDataURI:
media_type: str | None
data: bytes
uri: str
def __init__(self, media_type: str | None, data: bytes, uri: str) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...
def parse(uri: str) -> ParsedDataURI: ...
def discover(s: str) -> Generator[ParsedDataURI]: ...