mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 13:35:01 +08:00
first version finished
This commit is contained in:
46
django/utils/encoding.pyi
Normal file
46
django/utils/encoding.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
from datetime import date
|
||||
from typing import (
|
||||
Any,
|
||||
Optional,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
def escape_uri_path(path: str) -> str: ...
|
||||
|
||||
|
||||
def filepath_to_uri(path: Optional[str]) -> Optional[str]: ...
|
||||
|
||||
|
||||
def force_bytes(
|
||||
s: Any,
|
||||
encoding: str = ...,
|
||||
strings_only: bool = ...,
|
||||
errors: str = ...
|
||||
) -> Union[date, bytes]: ...
|
||||
|
||||
|
||||
def force_text(s: Any, encoding: str = ..., strings_only: bool = ..., errors: str = ...) -> Optional[str]: ...
|
||||
|
||||
|
||||
def get_system_encoding() -> str: ...
|
||||
|
||||
|
||||
def iri_to_uri(iri: Optional[str]) -> Optional[str]: ...
|
||||
|
||||
|
||||
def is_protected_type(obj: Any) -> bool: ...
|
||||
|
||||
|
||||
def repercent_broken_unicode(path: bytes) -> bytes: ...
|
||||
|
||||
|
||||
def smart_text(s: Any, encoding: str = ..., strings_only: bool = ..., errors: str = ...) -> str: ...
|
||||
|
||||
|
||||
def uri_to_iri(uri: Optional[str]) -> Optional[str]: ...
|
||||
|
||||
|
||||
class DjangoUnicodeDecodeError:
|
||||
def __init__(self, obj: bytes, *args) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
Reference in New Issue
Block a user