mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
Add stubs for datauri
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
version = "1.1.*"
|
||||
upstream_repository = "https://github.com/eclecticiq/python-data-uri"
|
||||
@@ -0,0 +1 @@
|
||||
from .datauri import DataURIError as DataURIError, discover as discover, parse as parse
|
||||
@@ -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]: ...
|
||||
Reference in New Issue
Block a user