mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 14:01:56 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
0
django-stubs-generated/utils/__init__.pyi
Normal file
0
django-stubs-generated/utils/__init__.pyi
Normal file
9
django-stubs-generated/utils/_os.pyi
Normal file
9
django-stubs-generated/utils/_os.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from os.path import abspath
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
abspathu = abspath
|
||||
|
||||
def upath(path: Any): ...
|
||||
def npath(path: Any): ...
|
||||
def safe_join(base: Union[bytes, str], *paths: Any) -> str: ...
|
||||
def symlinks_supported() -> Any: ...
|
||||
41
django-stubs-generated/utils/archive.pyi
Normal file
41
django-stubs-generated/utils/archive.pyi
Normal file
@@ -0,0 +1,41 @@
|
||||
from typing import Any, Iterator, List, Optional, Tuple, Union
|
||||
|
||||
|
||||
class ArchiveException(Exception): ...
|
||||
class UnrecognizedArchiveFormat(ArchiveException): ...
|
||||
|
||||
def extract(path: str, to_path: str = ...) -> None: ...
|
||||
|
||||
class Archive:
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def __enter__(self) -> Archive: ...
|
||||
def __exit__(
|
||||
self, exc_type: None, exc_value: None, traceback: None
|
||||
) -> None: ...
|
||||
def extract(self, to_path: str = ...) -> None: ...
|
||||
def list(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class BaseArchive:
|
||||
def split_leading_dir(
|
||||
self, path: str
|
||||
) -> Union[List[str], Tuple[str, str]]: ...
|
||||
def has_leading_dir(
|
||||
self, paths: Union[Iterator[Any], List[str]]
|
||||
) -> bool: ...
|
||||
def extract(self) -> None: ...
|
||||
def list(self) -> None: ...
|
||||
|
||||
class TarArchive(BaseArchive):
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def list(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def extract(self, to_path: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class ZipArchive(BaseArchive):
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def list(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def extract(self, to_path: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
extension_map: Any
|
||||
22
django-stubs-generated/utils/autoreload.pyi
Normal file
22
django-stubs-generated/utils/autoreload.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
from typing import Any, Callable, List, Optional
|
||||
|
||||
USE_INOTIFY: bool
|
||||
fd: Any
|
||||
RUN_RELOADER: bool
|
||||
FILE_MODIFIED: int
|
||||
I18N_MODIFIED: int
|
||||
|
||||
def gen_filenames(only_new: bool = ...) -> List[str]: ...
|
||||
def clean_files(filelist: List[Optional[str]]) -> List[str]: ...
|
||||
def reset_translations() -> None: ...
|
||||
def inotify_code_changed(): ...
|
||||
def code_changed(): ...
|
||||
def check_errors(fn: Callable) -> Callable: ...
|
||||
def raise_last_exception() -> None: ...
|
||||
def ensure_echo_on() -> None: ...
|
||||
def reloader_thread() -> None: ...
|
||||
def restart_with_reloader() -> int: ...
|
||||
def python_reloader(main_func: Any, args: Any, kwargs: Any) -> None: ...
|
||||
def main(
|
||||
main_func: Any, args: Optional[Any] = ..., kwargs: Optional[Any] = ...
|
||||
) -> None: ...
|
||||
30
django-stubs-generated/utils/baseconv.pyi
Normal file
30
django-stubs-generated/utils/baseconv.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
BASE2_ALPHABET: str
|
||||
BASE16_ALPHABET: str
|
||||
BASE56_ALPHABET: str
|
||||
BASE36_ALPHABET: str
|
||||
BASE62_ALPHABET: str
|
||||
BASE64_ALPHABET: Any
|
||||
|
||||
class BaseConverter:
|
||||
decimal_digits: str = ...
|
||||
sign: str = ...
|
||||
digits: str = ...
|
||||
def __init__(self, digits: str, sign: str = ...) -> None: ...
|
||||
def encode(self, i: int) -> str: ...
|
||||
def decode(self, s: str) -> int: ...
|
||||
def convert(
|
||||
self,
|
||||
number: Union[int, str],
|
||||
from_digits: str,
|
||||
to_digits: str,
|
||||
sign: str,
|
||||
) -> Tuple[int, str]: ...
|
||||
|
||||
base2: Any
|
||||
base16: Any
|
||||
base36: Any
|
||||
base56: Any
|
||||
base62: Any
|
||||
base64: Any
|
||||
39
django-stubs-generated/utils/cache.pyi
Normal file
39
django-stubs-generated/utils/cache.pyi
Normal file
@@ -0,0 +1,39 @@
|
||||
from typing import Any, Optional, Tuple
|
||||
|
||||
from django.core.cache.backends.base import BaseCache
|
||||
from django.core.cache.backends.locmem import LocMemCache
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.http.response import HttpResponse, HttpResponseBase
|
||||
|
||||
cc_delim_re: Any
|
||||
|
||||
def patch_cache_control(response: HttpResponseBase, **kwargs: Any) -> None: ...
|
||||
def get_max_age(response: HttpResponse) -> Optional[int]: ...
|
||||
def set_response_etag(response: HttpResponseBase) -> HttpResponseBase: ...
|
||||
def get_conditional_response(
|
||||
request: WSGIRequest,
|
||||
etag: Optional[str] = ...,
|
||||
last_modified: Optional[int] = ...,
|
||||
response: Optional[HttpResponse] = ...,
|
||||
) -> Optional[HttpResponse]: ...
|
||||
def patch_response_headers(
|
||||
response: HttpResponseBase, cache_timeout: float = ...
|
||||
) -> None: ...
|
||||
def add_never_cache_headers(response: HttpResponseBase) -> None: ...
|
||||
def patch_vary_headers(
|
||||
response: HttpResponseBase, newheaders: Tuple[str]
|
||||
) -> None: ...
|
||||
def has_vary_header(response: HttpResponse, header_query: str) -> bool: ...
|
||||
def get_cache_key(
|
||||
request: WSGIRequest,
|
||||
key_prefix: Optional[str] = ...,
|
||||
method: str = ...,
|
||||
cache: Optional[BaseCache] = ...,
|
||||
) -> Optional[str]: ...
|
||||
def learn_cache_key(
|
||||
request: WSGIRequest,
|
||||
response: HttpResponse,
|
||||
cache_timeout: Optional[float] = ...,
|
||||
key_prefix: Optional[str] = ...,
|
||||
cache: Optional[LocMemCache] = ...,
|
||||
) -> str: ...
|
||||
21
django-stubs-generated/utils/crypto.pyi
Normal file
21
django-stubs-generated/utils/crypto.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
from hmac import HMAC
|
||||
from typing import Any, Callable, Optional, Union
|
||||
|
||||
using_sysrandom: bool
|
||||
|
||||
def salted_hmac(
|
||||
key_salt: str,
|
||||
value: Union[bytes, str],
|
||||
secret: Optional[Union[bytes, str]] = ...,
|
||||
) -> HMAC: ...
|
||||
def get_random_string(length: int = ..., allowed_chars: str = ...) -> str: ...
|
||||
def constant_time_compare(
|
||||
val1: Union[bytes, str], val2: Union[bytes, str]
|
||||
) -> bool: ...
|
||||
def pbkdf2(
|
||||
password: Union[bytes, str],
|
||||
salt: Union[bytes, str],
|
||||
iterations: int,
|
||||
dklen: int = ...,
|
||||
digest: Optional[Callable] = ...,
|
||||
) -> bytes: ...
|
||||
133
django-stubs-generated/utils/datastructures.pyi
Normal file
133
django-stubs-generated/utils/datastructures.pyi
Normal file
@@ -0,0 +1,133 @@
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
from typing import (Any, Callable, Dict, Iterator, List, Optional, Tuple, Type,
|
||||
Union)
|
||||
from unittest.case import TestCase
|
||||
from uuid import UUID
|
||||
|
||||
from django.contrib.sitemaps import GenericSitemap
|
||||
from django.core.files.uploadedfile import InMemoryUploadedFile, UploadedFile
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.expressions import Combinable
|
||||
from django.test.testcases import SerializeMixin
|
||||
from django.test.utils import LoggingCaptureMixin
|
||||
from django.urls.converters import IntConverter, StringConverter
|
||||
|
||||
|
||||
class OrderedSet:
|
||||
dict: collections.OrderedDict = ...
|
||||
def __init__(
|
||||
self,
|
||||
iterable: Optional[
|
||||
Union[
|
||||
List[Tuple[str, str]],
|
||||
List[datetime],
|
||||
List[Combinable],
|
||||
List[int],
|
||||
List[str],
|
||||
List[UUID],
|
||||
OrderedDict,
|
||||
]
|
||||
] = ...,
|
||||
) -> None: ...
|
||||
def add(
|
||||
self,
|
||||
item: Union[
|
||||
Type[Model], SerializeMixin, LoggingCaptureMixin, int, TestCase
|
||||
],
|
||||
) -> None: ...
|
||||
def remove(self, item: Any) -> None: ...
|
||||
def discard(self, item: Any) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __contains__(self, item: Any): ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
class MultiValueDictKeyError(KeyError): ...
|
||||
|
||||
class MultiValueDict(dict):
|
||||
def __init__(
|
||||
self,
|
||||
key_to_list_mapping: Union[
|
||||
Dict[str, List[List[Any]]],
|
||||
Dict[str, List[int]],
|
||||
Dict[str, List[str]],
|
||||
List[Tuple[str, Union[List[List[Any]], List[str]]]],
|
||||
Tuple,
|
||||
] = ...,
|
||||
) -> None: ...
|
||||
def __getitem__(
|
||||
self, key: str
|
||||
) -> Optional[Union[List[str], UploadedFile, str]]: ...
|
||||
def __setitem__(
|
||||
self, key: str, value: Optional[Union[int, str]]
|
||||
) -> None: ...
|
||||
def __copy__(self) -> MultiValueDict: ...
|
||||
def __deepcopy__(self, memo: Any): ...
|
||||
def get(
|
||||
self, key: str, default: Optional[Union[int, str]] = ...
|
||||
) -> Optional[Union[InMemoryUploadedFile, int, str]]: ...
|
||||
def getlist(
|
||||
self, key: Optional[Union[Callable, str]], default: Any = ...
|
||||
) -> Any: ...
|
||||
def setlist(self, key: Union[Callable, str], list_: List[str]) -> None: ...
|
||||
def setdefault(self, key: str, default: str = ...) -> str: ...
|
||||
def setlistdefault(
|
||||
self, key: Union[Callable, str], default_list: None = ...
|
||||
) -> Union[
|
||||
List[
|
||||
Tuple[
|
||||
List[Tuple[str, List[str]]], str, Dict[str, str], Dict[Any, Any]
|
||||
]
|
||||
],
|
||||
List[UploadedFile],
|
||||
List[str],
|
||||
]: ...
|
||||
def appendlist(
|
||||
self,
|
||||
key: Union[Callable, str],
|
||||
value: Union[
|
||||
Tuple[
|
||||
List[Tuple[str, List[str]]],
|
||||
str,
|
||||
Dict[str, Dict[str, GenericSitemap]],
|
||||
Dict[str, Union[IntConverter, StringConverter]],
|
||||
],
|
||||
UploadedFile,
|
||||
str,
|
||||
],
|
||||
) -> None: ...
|
||||
def items(self) -> Iterator[Tuple[str, InMemoryUploadedFile]]: ...
|
||||
def lists(self): ...
|
||||
def values(self) -> Iterator[str]: ...
|
||||
def copy(self) -> MultiValueDict: ...
|
||||
def update(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def dict(self) -> Dict[str, str]: ...
|
||||
|
||||
class ImmutableList(tuple):
|
||||
warning: str = ...
|
||||
def __new__(
|
||||
cls: Type[ImmutableList], *args: Any, warning: str = ..., **kwargs: Any
|
||||
) -> ImmutableList: ...
|
||||
def complain(self, *wargs: Any, **kwargs: Any) -> Any: ...
|
||||
__delitem__: Any = ...
|
||||
__delslice__: Any = ...
|
||||
__iadd__: Any = ...
|
||||
__imul__: Any = ...
|
||||
__setitem__: Any = ...
|
||||
__setslice__: Any = ...
|
||||
append: Any = ...
|
||||
extend: Any = ...
|
||||
insert: Any = ...
|
||||
pop: Any = ...
|
||||
remove: Any = ...
|
||||
sort: Any = ...
|
||||
reverse: Any = ...
|
||||
|
||||
class DictWrapper(dict):
|
||||
func: Callable = ...
|
||||
prefix: str = ...
|
||||
def __init__(
|
||||
self, data: Dict[str, str], func: Callable, prefix: str
|
||||
) -> None: ...
|
||||
def __getitem__(self, key: str) -> Optional[Union[int, str]]: ...
|
||||
61
django-stubs-generated/utils/dateformat.pyi
Normal file
61
django-stubs-generated/utils/dateformat.pyi
Normal file
@@ -0,0 +1,61 @@
|
||||
from datetime import datetime
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
re_formatchars: Any
|
||||
re_escaped: Any
|
||||
|
||||
class Formatter:
|
||||
def format(self, formatstr: str) -> str: ...
|
||||
|
||||
class TimeFormat(Formatter):
|
||||
data: Union[datetime.datetime, str] = ...
|
||||
timezone: Optional[django.utils.timezone.FixedOffset] = ...
|
||||
def __init__(self, obj: Union[datetime, str]) -> None: ...
|
||||
def a(self) -> str: ...
|
||||
def A(self) -> str: ...
|
||||
def B(self) -> None: ...
|
||||
def e(self) -> str: ...
|
||||
def f(self) -> Union[int, str]: ...
|
||||
def g(self) -> int: ...
|
||||
def G(self) -> int: ...
|
||||
def h(self) -> str: ...
|
||||
def H(self) -> str: ...
|
||||
def i(self) -> str: ...
|
||||
def O(self) -> str: ...
|
||||
def P(self) -> str: ...
|
||||
def s(self) -> str: ...
|
||||
def T(self) -> str: ...
|
||||
def u(self) -> str: ...
|
||||
def Z(self) -> Union[int, str]: ...
|
||||
|
||||
class DateFormat(TimeFormat):
|
||||
data: Union[datetime.datetime, str]
|
||||
timezone: Optional[django.utils.timezone.FixedOffset]
|
||||
year_days: Any = ...
|
||||
def b(self): ...
|
||||
def c(self) -> str: ...
|
||||
def d(self) -> str: ...
|
||||
def D(self): ...
|
||||
def E(self): ...
|
||||
def F(self): ...
|
||||
def I(self) -> str: ...
|
||||
def j(self) -> int: ...
|
||||
def l(self): ...
|
||||
def L(self) -> bool: ...
|
||||
def m(self) -> str: ...
|
||||
def M(self) -> str: ...
|
||||
def n(self) -> int: ...
|
||||
def N(self): ...
|
||||
def o(self) -> int: ...
|
||||
def r(self) -> str: ...
|
||||
def S(self) -> str: ...
|
||||
def t(self) -> str: ...
|
||||
def U(self) -> int: ...
|
||||
def w(self) -> int: ...
|
||||
def W(self) -> int: ...
|
||||
def y(self) -> str: ...
|
||||
def Y(self) -> int: ...
|
||||
def z(self) -> int: ...
|
||||
|
||||
def format(value: Union[datetime, str], format_string: str) -> str: ...
|
||||
def time_format(value: Union[datetime, str], format_string: str) -> str: ...
|
||||
14
django-stubs-generated/utils/dateparse.pyi
Normal file
14
django-stubs-generated/utils/dateparse.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from datetime import date, datetime, time, timedelta
|
||||
from typing import Any, Optional
|
||||
|
||||
date_re: Any
|
||||
time_re: Any
|
||||
datetime_re: Any
|
||||
standard_duration_re: Any
|
||||
iso8601_duration_re: Any
|
||||
postgres_interval_re: Any
|
||||
|
||||
def parse_date(value: str) -> Optional[date]: ...
|
||||
def parse_time(value: str) -> Optional[time]: ...
|
||||
def parse_datetime(value: str) -> Optional[datetime]: ...
|
||||
def parse_duration(value: str) -> Optional[timedelta]: ...
|
||||
20
django-stubs-generated/utils/datetime_safe.pyi
Normal file
20
django-stubs-generated/utils/datetime_safe.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
from datetime import date as real_date
|
||||
from datetime import datetime as real_datetime
|
||||
from datetime import time as real_time
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
|
||||
class date(real_date):
|
||||
def strftime(self, fmt: str) -> str: ...
|
||||
|
||||
class datetime(real_datetime):
|
||||
def strftime(self, fmt: str) -> str: ...
|
||||
@classmethod
|
||||
def combine(cls, date: Any, time: Any): ...
|
||||
def date(self): ...
|
||||
|
||||
class time(real_time): ...
|
||||
|
||||
def new_date(d: date) -> date: ...
|
||||
def new_datetime(d: date) -> datetime: ...
|
||||
def strftime(dt: Union[date, datetime], fmt: str) -> str: ...
|
||||
9
django-stubs-generated/utils/deconstruct.pyi
Normal file
9
django-stubs-generated/utils/deconstruct.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any, Optional, Type, Union
|
||||
|
||||
from django.contrib.postgres.validators import KeysValidator
|
||||
from django.core.validators import RegexValidator
|
||||
|
||||
|
||||
def deconstructible(
|
||||
*args: Any, path: Optional[Any] = ...
|
||||
) -> Type[Union[KeysValidator, RegexValidator]]: ...
|
||||
43
django-stubs-generated/utils/decorators.pyi
Normal file
43
django-stubs-generated/utils/decorators.pyi
Normal file
@@ -0,0 +1,43 @@
|
||||
from typing import Any, Callable, Optional, Set, Tuple, Type, Union
|
||||
|
||||
from django.contrib.auth.mixins import AccessMixin
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.middleware.cache import CacheMiddleware
|
||||
from django.test.testcases import LiveServerTestCase
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
from django.views.generic.base import TemplateResponseMixin, View
|
||||
|
||||
|
||||
class classonlymethod(classmethod):
|
||||
def __get__(
|
||||
self,
|
||||
instance: Optional[View],
|
||||
cls: Type[
|
||||
Union[AccessMixin, SuccessMessageMixin, TemplateResponseMixin, View]
|
||||
] = ...,
|
||||
) -> Callable: ...
|
||||
|
||||
def method_decorator(
|
||||
decorator: Union[Callable, Set[Callable], Tuple[Callable, Callable]],
|
||||
name: str = ...,
|
||||
) -> Callable: ...
|
||||
def decorator_from_middleware_with_args(
|
||||
middleware_class: Type[CacheMiddleware]
|
||||
) -> Callable: ...
|
||||
def decorator_from_middleware(
|
||||
middleware_class: Type[MiddlewareMixin]
|
||||
) -> Callable: ...
|
||||
def available_attrs(fn: Any): ...
|
||||
def make_middleware_decorator(
|
||||
middleware_class: Type[MiddlewareMixin]
|
||||
) -> Callable: ...
|
||||
|
||||
class classproperty:
|
||||
fget: Optional[Callable] = ...
|
||||
def __init__(self, method: Optional[Callable] = ...) -> None: ...
|
||||
def __get__(
|
||||
self,
|
||||
instance: Optional[LiveServerTestCase],
|
||||
cls: Type[LiveServerTestCase] = ...,
|
||||
) -> str: ...
|
||||
def getter(self, method: Callable) -> classproperty: ...
|
||||
38
django-stubs-generated/utils/deprecation.pyi
Normal file
38
django-stubs-generated/utils/deprecation.pyi
Normal file
@@ -0,0 +1,38 @@
|
||||
from typing import Any, Callable, Optional, Type
|
||||
|
||||
from django.http.request import HttpRequest
|
||||
from django.http.response import HttpResponseBase
|
||||
|
||||
|
||||
class RemovedInDjango30Warning(PendingDeprecationWarning): ...
|
||||
class RemovedInNextVersionWarning(DeprecationWarning): ...
|
||||
|
||||
class warn_about_renamed_method:
|
||||
class_name: str = ...
|
||||
old_method_name: str = ...
|
||||
new_method_name: str = ...
|
||||
deprecation_warning: Type[DeprecationWarning] = ...
|
||||
def __init__(
|
||||
self,
|
||||
class_name: str,
|
||||
old_method_name: str,
|
||||
new_method_name: str,
|
||||
deprecation_warning: Type[DeprecationWarning],
|
||||
) -> None: ...
|
||||
def __call__(self, f: Callable) -> Callable: ...
|
||||
|
||||
class RenameMethodsBase(type):
|
||||
renamed_methods: Any = ...
|
||||
def __new__(cls, name: Any, bases: Any, attrs: Any): ...
|
||||
|
||||
class DeprecationInstanceCheck(type):
|
||||
alternative: str
|
||||
deprecation_warning: Type[
|
||||
django.utils.deprecation.RemovedInNextVersionWarning
|
||||
]
|
||||
def __instancecheck__(self, instance: Any): ...
|
||||
|
||||
class MiddlewareMixin:
|
||||
get_response: Any = ...
|
||||
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
|
||||
def __call__(self, request: HttpRequest) -> HttpResponseBase: ...
|
||||
7
django-stubs-generated/utils/duration.pyi
Normal file
7
django-stubs-generated/utils/duration.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from datetime import timedelta
|
||||
from typing import Any, Optional
|
||||
|
||||
|
||||
def duration_string(duration: timedelta) -> str: ...
|
||||
def duration_iso_string(duration: timedelta) -> str: ...
|
||||
def duration_microseconds(delta: timedelta) -> int: ...
|
||||
46
django-stubs-generated/utils/encoding.pyi
Normal file
46
django-stubs-generated/utils/encoding.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
from datetime import date
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
from django.db.models.base import Model
|
||||
|
||||
|
||||
class DjangoUnicodeDecodeError(UnicodeDecodeError):
|
||||
obj: bytes = ...
|
||||
def __init__(self, obj: bytes, *args: Any) -> None: ...
|
||||
|
||||
python_2_unicode_compatible: Any
|
||||
|
||||
def smart_text(
|
||||
s: Union[Model, int, str],
|
||||
encoding: str = ...,
|
||||
strings_only: bool = ...,
|
||||
errors: str = ...,
|
||||
) -> str: ...
|
||||
def is_protected_type(obj: Any) -> bool: ...
|
||||
def force_text(
|
||||
s: Optional[Union[bytes, Model, int, str]],
|
||||
encoding: str = ...,
|
||||
strings_only: bool = ...,
|
||||
errors: str = ...,
|
||||
) -> Optional[Union[int, str]]: ...
|
||||
def smart_bytes(
|
||||
s: Union[int, str],
|
||||
encoding: str = ...,
|
||||
strings_only: bool = ...,
|
||||
errors: str = ...,
|
||||
) -> bytes: ...
|
||||
def force_bytes(
|
||||
s: Any, encoding: str = ..., strings_only: bool = ..., errors: str = ...
|
||||
) -> Union[bytes, date]: ...
|
||||
|
||||
smart_str = smart_text
|
||||
force_str = force_text
|
||||
|
||||
def iri_to_uri(iri: Optional[str]) -> Optional[str]: ...
|
||||
def uri_to_iri(uri: Optional[str]) -> Optional[str]: ...
|
||||
def escape_uri_path(path: str) -> str: ...
|
||||
def repercent_broken_unicode(path: bytes) -> bytes: ...
|
||||
def filepath_to_uri(path: Optional[str]) -> Optional[str]: ...
|
||||
def get_system_encoding() -> str: ...
|
||||
|
||||
DEFAULT_LOCALE_ENCODING: Any
|
||||
149
django-stubs-generated/utils/feedgenerator.pyi
Normal file
149
django-stubs-generated/utils/feedgenerator.pyi
Normal file
@@ -0,0 +1,149 @@
|
||||
from datetime import date, datetime
|
||||
from io import StringIO
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from django.http.response import HttpResponse
|
||||
from django.utils.xmlutils import SimplerXMLGenerator
|
||||
|
||||
|
||||
def rfc2822_date(date: date) -> str: ...
|
||||
def rfc3339_date(date: date) -> str: ...
|
||||
def get_tag_uri(url: str, date: Optional[date]) -> str: ...
|
||||
|
||||
class SyndicationFeed:
|
||||
feed: Any = ...
|
||||
items: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
title: str,
|
||||
link: str,
|
||||
description: Optional[str],
|
||||
language: Optional[str] = ...,
|
||||
author_email: Optional[str] = ...,
|
||||
author_name: Optional[str] = ...,
|
||||
author_link: Optional[str] = ...,
|
||||
subtitle: Optional[str] = ...,
|
||||
categories: Optional[Tuple[str, str]] = ...,
|
||||
feed_url: Optional[str] = ...,
|
||||
feed_copyright: Optional[str] = ...,
|
||||
feed_guid: Optional[str] = ...,
|
||||
ttl: Optional[int] = ...,
|
||||
**kwargs: Any
|
||||
) -> None: ...
|
||||
def add_item(
|
||||
self,
|
||||
title: str,
|
||||
link: str,
|
||||
description: str,
|
||||
author_email: Optional[str] = ...,
|
||||
author_name: Optional[str] = ...,
|
||||
author_link: Optional[str] = ...,
|
||||
pubdate: Optional[datetime] = ...,
|
||||
comments: None = ...,
|
||||
unique_id: Optional[str] = ...,
|
||||
unique_id_is_permalink: Optional[bool] = ...,
|
||||
categories: Optional[Tuple] = ...,
|
||||
item_copyright: Optional[str] = ...,
|
||||
ttl: None = ...,
|
||||
updateddate: Optional[datetime] = ...,
|
||||
enclosures: Optional[List[Enclosure]] = ...,
|
||||
**kwargs: Any
|
||||
) -> None: ...
|
||||
def num_items(self): ...
|
||||
def root_attributes(self) -> Dict[Any, Any]: ...
|
||||
def add_root_elements(self, handler: Any) -> None: ...
|
||||
def item_attributes(self, item: Dict[str, Any]) -> Dict[Any, Any]: ...
|
||||
def add_item_elements(self, handler: Any, item: Any) -> None: ...
|
||||
def write(self, outfile: Any, encoding: Any) -> None: ...
|
||||
def writeString(self, encoding: str) -> str: ...
|
||||
def latest_post_date(self) -> datetime: ...
|
||||
|
||||
class Enclosure:
|
||||
length: Union[int, str]
|
||||
mime_type: str
|
||||
url: str = ...
|
||||
def __init__(
|
||||
self, url: str, length: Union[int, str], mime_type: str
|
||||
) -> None: ...
|
||||
|
||||
class RssFeed(SyndicationFeed):
|
||||
content_type: str = ...
|
||||
def write(
|
||||
self, outfile: Union[StringIO, HttpResponse], encoding: str
|
||||
) -> None: ...
|
||||
def rss_attributes(self) -> Dict[str, str]: ...
|
||||
def write_items(self, handler: SimplerXMLGenerator) -> None: ...
|
||||
def add_root_elements(self, handler: SimplerXMLGenerator) -> None: ...
|
||||
def endChannelElement(self, handler: SimplerXMLGenerator) -> None: ...
|
||||
|
||||
class RssUserland091Feed(RssFeed):
|
||||
feed: Dict[str, Optional[Union[List[str], str]]]
|
||||
items: List[
|
||||
Dict[str, Optional[Union[List[str], Tuple, datetime.datetime, str]]]
|
||||
]
|
||||
def add_item_elements(
|
||||
self,
|
||||
handler: SimplerXMLGenerator,
|
||||
item: Dict[str, Optional[Union[List[str], Tuple, datetime, str]]],
|
||||
) -> None: ...
|
||||
|
||||
class Rss201rev2Feed(RssFeed):
|
||||
feed: Dict[str, Optional[Union[List[str], Tuple, str]]]
|
||||
items: Union[
|
||||
List[Dict[str, Any]],
|
||||
List[
|
||||
Dict[
|
||||
str,
|
||||
Optional[
|
||||
Union[
|
||||
List[django.utils.feedgenerator.Enclosure],
|
||||
List[str],
|
||||
datetime.datetime,
|
||||
str,
|
||||
]
|
||||
],
|
||||
]
|
||||
],
|
||||
]
|
||||
def add_item_elements(
|
||||
self, handler: SimplerXMLGenerator, item: Dict[str, Any]
|
||||
) -> None: ...
|
||||
|
||||
class Atom1Feed(SyndicationFeed):
|
||||
feed: Dict[str, Optional[Union[List[str], Tuple, str]]]
|
||||
items: Union[
|
||||
List[
|
||||
Dict[
|
||||
str,
|
||||
Optional[
|
||||
Union[
|
||||
List[django.utils.feedgenerator.Enclosure],
|
||||
List[str],
|
||||
datetime.datetime,
|
||||
str,
|
||||
]
|
||||
],
|
||||
]
|
||||
],
|
||||
List[
|
||||
Dict[str, Optional[Union[List[str], Tuple, datetime.datetime, str]]]
|
||||
],
|
||||
]
|
||||
content_type: str = ...
|
||||
ns: str = ...
|
||||
def write(
|
||||
self, outfile: Union[StringIO, HttpResponse], encoding: str
|
||||
) -> None: ...
|
||||
def root_attributes(self) -> Dict[str, str]: ...
|
||||
def add_root_elements(self, handler: SimplerXMLGenerator) -> None: ...
|
||||
def write_items(self, handler: SimplerXMLGenerator) -> None: ...
|
||||
def add_item_elements(
|
||||
self,
|
||||
handler: SimplerXMLGenerator,
|
||||
item: Dict[
|
||||
str,
|
||||
Optional[Union[List[Enclosure], List[str], Tuple, datetime, str]],
|
||||
],
|
||||
) -> None: ...
|
||||
|
||||
DefaultFeed = Rss201rev2Feed
|
||||
44
django-stubs-generated/utils/formats.pyi
Normal file
44
django-stubs-generated/utils/formats.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from typing import Any, Iterator, List, Optional, Union
|
||||
|
||||
ISO_INPUT_FORMATS: Any
|
||||
FORMAT_SETTINGS: Any
|
||||
|
||||
def reset_format_cache() -> None: ...
|
||||
def iter_format_modules(
|
||||
lang: str, format_module_path: Optional[Union[List[str], str]] = ...
|
||||
) -> Iterator[Any]: ...
|
||||
def get_format_modules(
|
||||
lang: Optional[str] = ..., reverse: bool = ...
|
||||
) -> List[Any]: ...
|
||||
def get_format(
|
||||
format_type: str, lang: Optional[str] = ..., use_l10n: Optional[bool] = ...
|
||||
) -> Union[List[str], int, str]: ...
|
||||
|
||||
get_format_lazy: Any
|
||||
|
||||
def date_format(
|
||||
value: Union[datetime, str],
|
||||
format: Optional[str] = ...,
|
||||
use_l10n: Optional[bool] = ...,
|
||||
) -> str: ...
|
||||
def time_format(
|
||||
value: Union[datetime, str],
|
||||
format: Optional[str] = ...,
|
||||
use_l10n: None = ...,
|
||||
) -> str: ...
|
||||
def number_format(
|
||||
value: Union[Decimal, float, str],
|
||||
decimal_pos: Optional[int] = ...,
|
||||
use_l10n: Optional[bool] = ...,
|
||||
force_grouping: bool = ...,
|
||||
) -> str: ...
|
||||
def localize(value: Any, use_l10n: Optional[bool] = ...) -> Any: ...
|
||||
def localize_input(
|
||||
value: Optional[Union[datetime, Decimal, float, str]],
|
||||
default: Optional[str] = ...,
|
||||
) -> Optional[str]: ...
|
||||
def sanitize_separators(
|
||||
value: Union[Decimal, int, str]
|
||||
) -> Union[Decimal, int, str]: ...
|
||||
57
django-stubs-generated/utils/functional.pyi
Normal file
57
django-stubs-generated/utils/functional.pyi
Normal file
@@ -0,0 +1,57 @@
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||
|
||||
from django.db.models.base import Model
|
||||
|
||||
|
||||
def curry(_curried_func: Any, *args: Any, **kwargs: Any): ...
|
||||
|
||||
class cached_property:
|
||||
func: Callable = ...
|
||||
__doc__: Any = ...
|
||||
name: str = ...
|
||||
def __init__(self, func: Callable, name: Optional[str] = ...) -> None: ...
|
||||
def __get__(self, instance: Any, cls: Type[Any] = ...) -> Any: ...
|
||||
|
||||
class Promise: ...
|
||||
|
||||
def lazy(func: Union[Callable, Type[str]], *resultclasses: Any) -> Callable: ...
|
||||
def lazystr(text: Any): ...
|
||||
def keep_lazy(*resultclasses: Any) -> Callable: ...
|
||||
def keep_lazy_text(func: Callable) -> Callable: ...
|
||||
|
||||
empty: Any
|
||||
|
||||
def new_method_proxy(func: Any): ...
|
||||
|
||||
class LazyObject:
|
||||
def __init__(self) -> None: ...
|
||||
__getattr__: Any = ...
|
||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
def __reduce__(self) -> Tuple[Callable, Tuple[Model]]: ...
|
||||
def __copy__(self): ...
|
||||
def __deepcopy__(self, memo: Any): ...
|
||||
__bytes__: Any = ...
|
||||
__bool__: Any = ...
|
||||
__dir__: Any = ...
|
||||
__class__: Any = ...
|
||||
__eq__: Any = ...
|
||||
__ne__: Any = ...
|
||||
__hash__: Any = ...
|
||||
__getitem__: Any = ...
|
||||
__setitem__: Any = ...
|
||||
__delitem__: Any = ...
|
||||
__iter__: Any = ...
|
||||
__len__: Any = ...
|
||||
__contains__: Any = ...
|
||||
|
||||
def unpickle_lazyobject(wrapped: Model) -> Model: ...
|
||||
|
||||
class SimpleLazyObject(LazyObject):
|
||||
def __init__(self, func: Callable) -> None: ...
|
||||
def __copy__(self) -> List[int]: ...
|
||||
def __deepcopy__(self, memo: Dict[Any, Any]) -> List[int]: ...
|
||||
|
||||
def partition(
|
||||
predicate: Callable, values: List[Model]
|
||||
) -> Tuple[List[Model], List[Model]]: ...
|
||||
48
django-stubs-generated/utils/html.pyi
Normal file
48
django-stubs-generated/utils/html.pyi
Normal file
@@ -0,0 +1,48 @@
|
||||
from html.parser import HTMLParser
|
||||
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
|
||||
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.fields.files import FieldFile
|
||||
from django.utils.safestring import SafeText
|
||||
|
||||
TRAILING_PUNCTUATION_CHARS: str
|
||||
WRAPPING_PUNCTUATION: Any
|
||||
DOTS: Any
|
||||
unencoded_ampersands_re: Any
|
||||
word_split_re: Any
|
||||
simple_url_re: Any
|
||||
simple_url_2_re: Any
|
||||
|
||||
def escape(text: Optional[Union[Model, FieldFile, int, str]]) -> SafeText: ...
|
||||
def escapejs(value: str) -> SafeText: ...
|
||||
def json_script(
|
||||
value: Union[Dict[str, str], str], element_id: str
|
||||
) -> SafeText: ...
|
||||
def conditional_escape(text: Any) -> str: ...
|
||||
def format_html(format_string: str, *args: Any, **kwargs: Any) -> SafeText: ...
|
||||
def format_html_join(
|
||||
sep: str,
|
||||
format_string: str,
|
||||
args_generator: Union[Iterator[Any], List[Tuple[str]]],
|
||||
) -> SafeText: ...
|
||||
def linebreaks(value: str, autoescape: bool = ...) -> str: ...
|
||||
|
||||
class MLStripper(HTMLParser):
|
||||
fed: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def handle_data(self, d: str) -> None: ...
|
||||
def handle_entityref(self, name: str) -> None: ...
|
||||
def handle_charref(self, name: str) -> None: ...
|
||||
def get_data(self) -> str: ...
|
||||
|
||||
def strip_tags(value: str) -> str: ...
|
||||
def strip_spaces_between_tags(value: str) -> str: ...
|
||||
def smart_urlquote(url: str) -> str: ...
|
||||
def urlize(
|
||||
text: str,
|
||||
trim_url_limit: Optional[int] = ...,
|
||||
nofollow: bool = ...,
|
||||
autoescape: bool = ...,
|
||||
) -> str: ...
|
||||
def avoid_wrapping(value: str) -> str: ...
|
||||
def html_safe(klass: Any): ...
|
||||
44
django-stubs-generated/utils/http.pyi
Normal file
44
django-stubs-generated/utils/http.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple, Union
|
||||
|
||||
ETAG_MATCH: Any
|
||||
MONTHS: Any
|
||||
RFC1123_DATE: Any
|
||||
RFC850_DATE: Any
|
||||
ASCTIME_DATE: Any
|
||||
RFC3986_GENDELIMS: str
|
||||
RFC3986_SUBDELIMS: str
|
||||
FIELDS_MATCH: Any
|
||||
|
||||
def urlquote(url: str, safe: str = ...) -> str: ...
|
||||
def urlquote_plus(url: str, safe: str = ...) -> str: ...
|
||||
def urlunquote(quoted_url: str) -> str: ...
|
||||
def urlunquote_plus(quoted_url: str) -> str: ...
|
||||
def urlencode(query: Any, doseq: bool = ...) -> str: ...
|
||||
def cookie_date(epoch_seconds: float = ...) -> str: ...
|
||||
def http_date(epoch_seconds: float = ...) -> str: ...
|
||||
def parse_http_date(date: str) -> int: ...
|
||||
def parse_http_date_safe(date: str) -> Optional[int]: ...
|
||||
def base36_to_int(
|
||||
s: Union[Dict[int, int], Tuple[int, int, int], float, str]
|
||||
) -> int: ...
|
||||
def int_to_base36(
|
||||
i: Union[Dict[int, int], Tuple[int, int, int], float, str]
|
||||
) -> str: ...
|
||||
def urlsafe_base64_encode(s: bytes) -> bytes: ...
|
||||
def urlsafe_base64_decode(s: Union[bytes, str]) -> bytes: ...
|
||||
def parse_etags(etag_str: str) -> List[str]: ...
|
||||
def quote_etag(etag_str: str) -> str: ...
|
||||
def is_same_domain(host: str, pattern: str) -> bool: ...
|
||||
def is_safe_url(
|
||||
url: Optional[str],
|
||||
allowed_hosts: Optional[Set[str]],
|
||||
require_https: bool = ...,
|
||||
) -> bool: ...
|
||||
def limited_parse_qsl(
|
||||
qs: str,
|
||||
keep_blank_values: bool = ...,
|
||||
encoding: str = ...,
|
||||
errors: str = ...,
|
||||
fields_limit: Optional[int] = ...,
|
||||
) -> List[Tuple[str, str]]: ...
|
||||
def escape_leading_slashes(url: str) -> str: ...
|
||||
9
django-stubs-generated/utils/inspect.pyi
Normal file
9
django-stubs-generated/utils/inspect.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any, Callable, List, Optional, Tuple
|
||||
|
||||
|
||||
def get_func_args(func: Callable) -> List[str]: ...
|
||||
def get_func_full_args(func: Callable) -> List[Tuple[str]]: ...
|
||||
def func_accepts_kwargs(func: Callable) -> bool: ...
|
||||
def func_accepts_var_args(func: Callable) -> bool: ...
|
||||
def func_has_no_args(func: Any): ...
|
||||
def func_supports_parameter(func: Callable, parameter: str) -> bool: ...
|
||||
7
django-stubs-generated/utils/ipv6.pyi
Normal file
7
django-stubs-generated/utils/ipv6.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
|
||||
def clean_ipv6_address(
|
||||
ip_str: Any, unpack_ipv4: bool = ..., error_message: Any = ...
|
||||
): ...
|
||||
def is_valid_ipv6_address(ip_str: str) -> bool: ...
|
||||
19
django-stubs-generated/utils/itercompat.pyi
Normal file
19
django-stubs-generated/utils/itercompat.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from tempfile import _TemporaryFileWrapper
|
||||
from typing import Any, List, Optional, Tuple, Union
|
||||
|
||||
from django.core.checks.messages import CheckMessage
|
||||
|
||||
|
||||
def is_iterable(
|
||||
x: Optional[
|
||||
Union[
|
||||
List[List[Union[List[List[Union[List[List[str]], str]]], str]]],
|
||||
List[Tuple[Optional[Union[int, str]], Union[int, str]]],
|
||||
List[CheckMessage],
|
||||
List[int],
|
||||
List[str],
|
||||
Tuple[Union[Tuple[str, str], _TemporaryFileWrapper]],
|
||||
int,
|
||||
]
|
||||
]
|
||||
) -> bool: ...
|
||||
29
django-stubs-generated/utils/jslex.pyi
Normal file
29
django-stubs-generated/utils/jslex.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
from typing import Any, Dict, Iterator, List, Optional, Tuple
|
||||
|
||||
|
||||
class Tok:
|
||||
num: int = ...
|
||||
id: int = ...
|
||||
name: str = ...
|
||||
regex: str = ...
|
||||
next: Optional[str] = ...
|
||||
def __init__(
|
||||
self, name: str, regex: str, next: Optional[str] = ...
|
||||
) -> None: ...
|
||||
|
||||
def literals(choices: str, prefix: str = ..., suffix: str = ...) -> str: ...
|
||||
|
||||
class Lexer:
|
||||
regexes: Any = ...
|
||||
toks: Any = ...
|
||||
state: Any = ...
|
||||
def __init__(self, states: Dict[str, List[Tok]], first: str) -> None: ...
|
||||
def lex(self, text: str) -> Iterator[Tuple[str, str]]: ...
|
||||
|
||||
class JsLexer(Lexer):
|
||||
both_before: Any = ...
|
||||
both_after: Any = ...
|
||||
states: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
def prepare_js_for_gettext(js: str) -> str: ...
|
||||
64
django-stubs-generated/utils/log.pyi
Normal file
64
django-stubs-generated/utils/log.pyi
Normal file
@@ -0,0 +1,64 @@
|
||||
import logging.config
|
||||
from logging import LogRecord
|
||||
from typing import Any, Callable, Dict, List, Optional, Union
|
||||
|
||||
from django.core.mail.backends.locmem import EmailBackend
|
||||
|
||||
request_logger: Any
|
||||
DEFAULT_LOGGING: Any
|
||||
|
||||
def configure_logging(
|
||||
logging_config: str,
|
||||
logging_settings: Dict[
|
||||
str, Union[Dict[str, Dict[str, Union[List[str], bool, str]]], int]
|
||||
],
|
||||
) -> None: ...
|
||||
|
||||
class AdminEmailHandler(logging.Handler):
|
||||
filters: List[django.utils.log.RequireDebugFalse]
|
||||
formatter: None
|
||||
level: int
|
||||
lock: _thread.RLock
|
||||
include_html: bool = ...
|
||||
email_backend: Optional[str] = ...
|
||||
def __init__(
|
||||
self, include_html: bool = ..., email_backend: None = ...
|
||||
) -> None: ...
|
||||
def emit(self, record: LogRecord) -> None: ...
|
||||
def send_mail(
|
||||
self, subject: str, message: str, *args: Any, **kwargs: Any
|
||||
) -> None: ...
|
||||
def connection(self) -> EmailBackend: ...
|
||||
def format_subject(self, subject: str) -> str: ...
|
||||
|
||||
class CallbackFilter(logging.Filter):
|
||||
callback: Callable = ...
|
||||
def __init__(self, callback: Callable) -> None: ...
|
||||
def filter(self, record: str) -> int: ...
|
||||
|
||||
class RequireDebugFalse(logging.Filter):
|
||||
name: str
|
||||
nlen: int
|
||||
def filter(self, record: Union[LogRecord, str]) -> bool: ...
|
||||
|
||||
class RequireDebugTrue(logging.Filter):
|
||||
name: str
|
||||
nlen: int
|
||||
def filter(self, record: Union[LogRecord, str]) -> bool: ...
|
||||
|
||||
class ServerFormatter(logging.Formatter):
|
||||
datefmt: None
|
||||
style: django.core.management.color.Style = ...
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def format(self, record: LogRecord) -> str: ...
|
||||
def uses_server_time(self) -> bool: ...
|
||||
|
||||
def log_response(
|
||||
message: str,
|
||||
*args: Any,
|
||||
response: Optional[Any] = ...,
|
||||
request: Optional[Any] = ...,
|
||||
logger: Any = ...,
|
||||
level: Optional[Any] = ...,
|
||||
exc_info: Optional[Any] = ...
|
||||
) -> None: ...
|
||||
10
django-stubs-generated/utils/lorem_ipsum.pyi
Normal file
10
django-stubs-generated/utils/lorem_ipsum.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any, List, Optional
|
||||
|
||||
COMMON_P: str
|
||||
WORDS: Any
|
||||
COMMON_WORDS: Any
|
||||
|
||||
def sentence() -> str: ...
|
||||
def paragraph() -> str: ...
|
||||
def paragraphs(count: int, common: bool = ...) -> List[str]: ...
|
||||
def words(count: int, common: bool = ...) -> str: ...
|
||||
7
django-stubs-generated/utils/module_loading.pyi
Normal file
7
django-stubs-generated/utils/module_loading.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
|
||||
def import_string(dotted_path: str) -> Any: ...
|
||||
def autodiscover_modules(*args: Any, **kwargs: Any) -> None: ...
|
||||
def module_has_submodule(package: Any, module_name: str) -> bool: ...
|
||||
def module_dir(module: Any) -> str: ...
|
||||
13
django-stubs-generated/utils/numberformat.pyi
Normal file
13
django-stubs-generated/utils/numberformat.pyi
Normal file
@@ -0,0 +1,13 @@
|
||||
from decimal import Decimal
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
|
||||
def format(
|
||||
number: Union[Decimal, float, str],
|
||||
decimal_sep: str,
|
||||
decimal_pos: Optional[int] = ...,
|
||||
grouping: Union[Tuple[int, int, int], int] = ...,
|
||||
thousand_sep: str = ...,
|
||||
force_grouping: bool = ...,
|
||||
use_l10n: Optional[bool] = ...,
|
||||
) -> str: ...
|
||||
20
django-stubs-generated/utils/regex_helper.pyi
Normal file
20
django-stubs-generated/utils/regex_helper.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
from typing import Any, Iterator, List, Optional, Tuple, Type, Union
|
||||
|
||||
ESCAPE_MAPPINGS: Any
|
||||
|
||||
class Choice(list): ...
|
||||
class Group(list): ...
|
||||
class NonCapture(list): ...
|
||||
|
||||
def normalize(pattern: str) -> List[Tuple[str, List[str]]]: ...
|
||||
def next_char(input_iter: Any) -> None: ...
|
||||
def walk_to_end(ch: str, input_iter: Iterator[Any]) -> None: ...
|
||||
def get_quantifier(
|
||||
ch: str, input_iter: Iterator[Any]
|
||||
) -> Tuple[int, Optional[str]]: ...
|
||||
def contains(
|
||||
source: Union[Group, NonCapture, str], inst: Type[Group]
|
||||
) -> bool: ...
|
||||
def flatten_result(
|
||||
source: Optional[Union[List[Union[Choice, Group, str]], Group, NonCapture]]
|
||||
) -> Tuple[List[str], List[List[str]]]: ...
|
||||
19
django-stubs-generated/utils/safestring.pyi
Normal file
19
django-stubs-generated/utils/safestring.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from typing import Any, Callable, Optional, Union
|
||||
|
||||
from django.forms.boundfield import BoundField
|
||||
|
||||
|
||||
class SafeData:
|
||||
def __html__(self) -> SafeText: ...
|
||||
|
||||
class SafeBytes(bytes, SafeData):
|
||||
def __add__(self, rhs: Any): ...
|
||||
|
||||
class SafeText(str, SafeData):
|
||||
def __add__(self, rhs: str) -> str: ...
|
||||
|
||||
SafeString = SafeText
|
||||
|
||||
def mark_safe(
|
||||
s: Union[Callable, BoundField, str]
|
||||
) -> Union[Callable, BoundField, str]: ...
|
||||
151
django-stubs-generated/utils/six.pyi
Normal file
151
django-stubs-generated/utils/six.pyi
Normal file
@@ -0,0 +1,151 @@
|
||||
import types
|
||||
from typing import Any, Optional
|
||||
|
||||
PY2: Any
|
||||
PY3: Any
|
||||
PY34: Any
|
||||
string_types: Any
|
||||
integer_types: Any
|
||||
class_types: Any
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
MAXSIZE: Any
|
||||
text_type = unicode
|
||||
binary_type = str
|
||||
|
||||
class X:
|
||||
def __len__(self): ...
|
||||
|
||||
class _LazyDescr:
|
||||
name: Any = ...
|
||||
def __init__(self, name: Any) -> None: ...
|
||||
def __get__(self, obj: Any, tp: Any): ...
|
||||
|
||||
class MovedModule(_LazyDescr):
|
||||
mod: Any = ...
|
||||
def __init__(
|
||||
self, name: Any, old: Any, new: Optional[Any] = ...
|
||||
) -> None: ...
|
||||
def __getattr__(self, attr: Any): ...
|
||||
|
||||
class _LazyModule(types.ModuleType):
|
||||
__doc__: Any = ...
|
||||
def __init__(self, name: Any) -> None: ...
|
||||
def __dir__(self): ...
|
||||
|
||||
class MovedAttribute(_LazyDescr):
|
||||
mod: Any = ...
|
||||
attr: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
name: Any,
|
||||
old_mod: Any,
|
||||
new_mod: Any,
|
||||
old_attr: Optional[Any] = ...,
|
||||
new_attr: Optional[Any] = ...,
|
||||
) -> None: ...
|
||||
|
||||
class _SixMetaPathImporter:
|
||||
name: Any = ...
|
||||
known_modules: Any = ...
|
||||
def __init__(self, six_module_name: Any) -> None: ...
|
||||
def find_module(self, fullname: Any, path: Optional[Any] = ...): ...
|
||||
def load_module(self, fullname: Any): ...
|
||||
def is_package(self, fullname: Any): ...
|
||||
def get_code(self, fullname: Any): ...
|
||||
get_source: Any = ...
|
||||
|
||||
class _MovedItems(_LazyModule):
|
||||
__path__: Any = ...
|
||||
|
||||
moves: Any
|
||||
|
||||
class Module_six_moves_urllib_parse(_LazyModule): ...
|
||||
class Module_six_moves_urllib_error(_LazyModule): ...
|
||||
class Module_six_moves_urllib_request(_LazyModule): ...
|
||||
class Module_six_moves_urllib_response(_LazyModule): ...
|
||||
class Module_six_moves_urllib_robotparser(_LazyModule): ...
|
||||
|
||||
class Module_six_moves_urllib(types.ModuleType):
|
||||
__path__: Any = ...
|
||||
parse: Any = ...
|
||||
error: Any = ...
|
||||
request: Any = ...
|
||||
response: Any = ...
|
||||
robotparser: Any = ...
|
||||
def __dir__(self): ...
|
||||
|
||||
def add_move(move: Any) -> None: ...
|
||||
def remove_move(name: Any) -> None: ...
|
||||
|
||||
advance_iterator = next
|
||||
next = advance_iterator
|
||||
callable = callable
|
||||
|
||||
def get_unbound_function(unbound: Any): ...
|
||||
|
||||
create_bound_method: Any
|
||||
|
||||
def create_unbound_method(func: Any, cls: Any): ...
|
||||
|
||||
Iterator = object
|
||||
|
||||
class Iterator:
|
||||
def next(self): ...
|
||||
|
||||
callable = callable
|
||||
get_method_function: Any
|
||||
get_method_self: Any
|
||||
get_function_closure: Any
|
||||
get_function_code: Any
|
||||
get_function_defaults: Any
|
||||
get_function_globals: Any
|
||||
|
||||
def iterkeys(d: Any, **kw: Any): ...
|
||||
def itervalues(d: Any, **kw: Any): ...
|
||||
def iteritems(d: Any, **kw: Any): ...
|
||||
def iterlists(d: Any, **kw: Any): ...
|
||||
|
||||
viewkeys: Any
|
||||
viewvalues: Any
|
||||
viewitems: Any
|
||||
|
||||
def b(s: Any): ...
|
||||
def u(s: Any): ...
|
||||
|
||||
unichr = chr
|
||||
int2byte: Any
|
||||
byte2int: Any
|
||||
indexbytes: Any
|
||||
iterbytes = iter
|
||||
StringIO: Any
|
||||
BytesIO: Any
|
||||
unichr = unichr
|
||||
int2byte = chr
|
||||
|
||||
def assertCountEqual(self, *args: Any, **kwargs: Any): ...
|
||||
def assertRaisesRegex(self, *args: Any, **kwargs: Any): ...
|
||||
def assertRegex(self, *args: Any, **kwargs: Any): ...
|
||||
|
||||
exec_: Any
|
||||
|
||||
def reraise(tp: Any, value: Any, tb: Optional[Any] = ...) -> None: ...
|
||||
def raise_from(value: Any, from_value: Any) -> None: ...
|
||||
|
||||
print_: Any
|
||||
_print = print_
|
||||
|
||||
def wraps(wrapped: Any, assigned: Any = ..., updated: Any = ...): ...
|
||||
|
||||
wraps: Any
|
||||
|
||||
def with_metaclass(meta: Any, *bases: Any): ...
|
||||
def add_metaclass(metaclass: Any): ...
|
||||
def python_2_unicode_compatible(klass: Any): ...
|
||||
|
||||
__path__: Any
|
||||
__package__ = __name__
|
||||
memoryview = memoryview
|
||||
buffer_types: Any
|
||||
memoryview = memoryview
|
||||
memoryview = buffer
|
||||
22
django-stubs-generated/utils/termcolors.pyi
Normal file
22
django-stubs-generated/utils/termcolors.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
from typing import Any, Callable, Dict, Optional, Tuple, Union
|
||||
|
||||
color_names: Any
|
||||
foreground: Any
|
||||
background: Any
|
||||
RESET: str
|
||||
opt_dict: Any
|
||||
|
||||
def colorize(
|
||||
text: Optional[str] = ..., opts: Union[Tuple, str] = ..., **kwargs: Any
|
||||
) -> str: ...
|
||||
def make_style(opts: Tuple = ..., **kwargs: Any) -> Callable: ...
|
||||
|
||||
NOCOLOR_PALETTE: str
|
||||
DARK_PALETTE: str
|
||||
LIGHT_PALETTE: str
|
||||
PALETTES: Any
|
||||
DEFAULT_PALETTE = DARK_PALETTE
|
||||
|
||||
def parse_color_setting(
|
||||
config_string: str
|
||||
) -> Optional[Dict[str, Dict[str, Union[Tuple[str], str]]]]: ...
|
||||
54
django-stubs-generated/utils/text.pyi
Normal file
54
django-stubs-generated/utils/text.pyi
Normal file
@@ -0,0 +1,54 @@
|
||||
from typing import Any, Iterator, List, Optional, Union
|
||||
|
||||
from django.db.models.base import Model
|
||||
from django.utils.functional import SimpleLazyObject
|
||||
from django.utils.safestring import SafeText
|
||||
|
||||
|
||||
def capfirst(x: Optional[str]) -> Optional[str]: ...
|
||||
|
||||
re_words: Any
|
||||
re_chars: Any
|
||||
re_tag: Any
|
||||
re_newlines: Any
|
||||
re_camel_case: Any
|
||||
|
||||
def wrap(text: str, width: int) -> str: ...
|
||||
|
||||
class Truncator(SimpleLazyObject):
|
||||
def __init__(self, text: Union[Model, str]) -> None: ...
|
||||
def add_truncation_text(
|
||||
self, text: str, truncate: Optional[str] = ...
|
||||
) -> str: ...
|
||||
def chars(
|
||||
self, num: int, truncate: Optional[str] = ..., html: bool = ...
|
||||
) -> str: ...
|
||||
def words(
|
||||
self, num: int, truncate: Optional[str] = ..., html: bool = ...
|
||||
) -> str: ...
|
||||
|
||||
def get_valid_filename(s: str) -> str: ...
|
||||
def get_text_list(list_: List[str], last_word: str = ...) -> str: ...
|
||||
def normalize_newlines(text: str) -> str: ...
|
||||
def phone2numeric(phone: str) -> str: ...
|
||||
def compress_string(s: bytes) -> bytes: ...
|
||||
|
||||
class StreamingBuffer:
|
||||
vals: List[bytes] = ...
|
||||
def __init__(self) -> None: ...
|
||||
def write(self, val: bytes) -> None: ...
|
||||
def read(self) -> bytes: ...
|
||||
def flush(self): ...
|
||||
def close(self): ...
|
||||
|
||||
def compress_sequence(sequence: Union[List[bytes], map]) -> Iterator[bytes]: ...
|
||||
|
||||
smart_split_re: Any
|
||||
|
||||
def smart_split(text: str) -> Iterator[str]: ...
|
||||
def unescape_entities(text: str) -> str: ...
|
||||
def unescape_string_literal(s: str) -> str: ...
|
||||
def slugify(value: str, allow_unicode: bool = ...) -> SafeText: ...
|
||||
def camel_case_to_spaces(value: str) -> str: ...
|
||||
|
||||
format_lazy: Any
|
||||
15
django-stubs-generated/utils/timesince.pyi
Normal file
15
django-stubs-generated/utils/timesince.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from datetime import date
|
||||
from typing import Any, Optional
|
||||
|
||||
TIME_STRINGS: Any
|
||||
TIMESINCE_CHUNKS: Any
|
||||
|
||||
def timesince(
|
||||
d: date,
|
||||
now: Optional[date] = ...,
|
||||
reversed: bool = ...,
|
||||
time_strings: None = ...,
|
||||
) -> str: ...
|
||||
def timeuntil(
|
||||
d: date, now: Optional[date] = ..., time_strings: None = ...
|
||||
) -> str: ...
|
||||
46
django-stubs-generated/utils/timezone.pyi
Normal file
46
django-stubs-generated/utils/timezone.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
from contextlib import ContextDecorator
|
||||
from datetime import date, datetime, timedelta, tzinfo
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
|
||||
class FixedOffset(tzinfo):
|
||||
def __init__(
|
||||
self, offset: Optional[float] = ..., name: Optional[str] = ...
|
||||
) -> None: ...
|
||||
def utcoffset(self, dt: Union[datetime, str]) -> timedelta: ...
|
||||
def tzname(self, dt: Optional[Union[datetime, str]]) -> str: ...
|
||||
def dst(self, dt: datetime) -> timedelta: ...
|
||||
|
||||
utc: Any
|
||||
|
||||
def get_fixed_timezone(offset: Union[timedelta, int]) -> FixedOffset: ...
|
||||
def get_default_timezone(): ...
|
||||
def get_default_timezone_name() -> str: ...
|
||||
def get_current_timezone() -> FixedOffset: ...
|
||||
def get_current_timezone_name() -> str: ...
|
||||
def activate(timezone: Optional[Union[FixedOffset, str]]) -> None: ...
|
||||
def deactivate() -> None: ...
|
||||
|
||||
class override(ContextDecorator):
|
||||
timezone: Optional[Union[django.utils.timezone.FixedOffset, str]] = ...
|
||||
def __init__(self, timezone: Optional[Union[FixedOffset, str]]) -> None: ...
|
||||
old_timezone: Optional[django.utils.timezone.FixedOffset] = ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: None, exc_value: None, traceback: None
|
||||
) -> None: ...
|
||||
|
||||
def localtime(
|
||||
value: Optional[datetime] = ..., timezone: Optional[FixedOffset] = ...
|
||||
) -> datetime: ...
|
||||
def now() -> datetime: ...
|
||||
def is_aware(value: datetime) -> bool: ...
|
||||
def is_naive(value: datetime) -> bool: ...
|
||||
def make_aware(
|
||||
value: datetime,
|
||||
timezone: Optional[FixedOffset] = ...,
|
||||
is_dst: Optional[bool] = ...,
|
||||
) -> datetime: ...
|
||||
def make_naive(
|
||||
value: datetime, timezone: Optional[FixedOffset] = ...
|
||||
) -> datetime: ...
|
||||
78
django-stubs-generated/utils/translation/__init__.pyi
Normal file
78
django-stubs-generated/utils/translation/__init__.pyi
Normal file
@@ -0,0 +1,78 @@
|
||||
from contextlib import ContextDecorator
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
|
||||
LANGUAGE_SESSION_KEY: str
|
||||
|
||||
class TranslatorCommentWarning(SyntaxWarning): ...
|
||||
|
||||
class Trans:
|
||||
activate: Callable
|
||||
check_for_language: functools._lru_cache_wrapper
|
||||
deactivate: Callable
|
||||
deactivate_all: Callable
|
||||
get_language: Callable
|
||||
get_language_bidi: Callable
|
||||
get_language_from_path: Callable
|
||||
get_language_from_request: Callable
|
||||
gettext: Callable
|
||||
gettext_noop: Callable
|
||||
ngettext: Callable
|
||||
npgettext: Callable
|
||||
pgettext: Callable
|
||||
def __getattr__(self, real_name: Any): ...
|
||||
|
||||
def gettext_noop(message: str) -> str: ...
|
||||
|
||||
ugettext_noop = gettext_noop
|
||||
|
||||
def gettext(message: str) -> str: ...
|
||||
|
||||
ugettext = gettext
|
||||
|
||||
def ngettext(singular: str, plural: str, number: float) -> str: ...
|
||||
|
||||
ungettext = ngettext
|
||||
|
||||
def pgettext(context: str, message: str) -> str: ...
|
||||
def npgettext(context: str, singular: str, plural: str, number: int) -> str: ...
|
||||
|
||||
gettext_lazy: Any
|
||||
|
||||
ugettext_lazy: Any
|
||||
pgettext_lazy: Any
|
||||
|
||||
def ngettext_lazy(singular: Any, plural: Any, number: Optional[Any] = ...): ...
|
||||
|
||||
ungettext_lazy = ngettext_lazy
|
||||
|
||||
def npgettext_lazy(
|
||||
context: Any, singular: Any, plural: Any, number: Optional[Any] = ...
|
||||
): ...
|
||||
def activate(language: str) -> None: ...
|
||||
def deactivate() -> None: ...
|
||||
|
||||
class override(ContextDecorator):
|
||||
language: Optional[str] = ...
|
||||
deactivate: bool = ...
|
||||
def __init__(
|
||||
self, language: Optional[str], deactivate: bool = ...
|
||||
) -> None: ...
|
||||
old_language: Optional[str] = ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: None, exc_value: None, traceback: None
|
||||
) -> None: ...
|
||||
|
||||
def get_language() -> Optional[str]: ...
|
||||
def get_language_bidi() -> bool: ...
|
||||
def check_for_language(lang_code: Optional[str]) -> bool: ...
|
||||
def to_language(locale: str) -> str: ...
|
||||
def to_locale(language: str) -> str: ...
|
||||
def get_language_from_request(
|
||||
request: WSGIRequest, check_path: bool = ...
|
||||
) -> str: ...
|
||||
def templatize(src: str, **kwargs: Any) -> str: ...
|
||||
def deactivate_all() -> None: ...
|
||||
def get_language_info(lang_code: str) -> Any: ...
|
||||
14
django-stubs-generated/utils/translation/template.pyi
Normal file
14
django-stubs-generated/utils/translation/template.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
dot_re: Any
|
||||
|
||||
def blankout(src: str, char: str) -> str: ...
|
||||
|
||||
context_re: Any
|
||||
inline_re: Any
|
||||
block_re: Any
|
||||
endblock_re: Any
|
||||
plural_re: Any
|
||||
constant_re: Any
|
||||
|
||||
def templatize(src: str, origin: str = ...) -> str: ...
|
||||
28
django-stubs-generated/utils/translation/trans_null.pyi
Normal file
28
django-stubs-generated/utils/translation/trans_null.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
|
||||
def gettext(message: Any): ...
|
||||
|
||||
gettext_noop = gettext
|
||||
gettext_lazy = gettext
|
||||
_ = gettext
|
||||
|
||||
def ngettext(singular: str, plural: str, number: int) -> str: ...
|
||||
|
||||
ngettext_lazy = ngettext
|
||||
|
||||
def pgettext(context: Any, message: Any): ...
|
||||
def npgettext(context: Any, singular: Any, plural: Any, number: Any): ...
|
||||
def activate(x: Any): ...
|
||||
def deactivate(): ...
|
||||
|
||||
deactivate_all = deactivate
|
||||
|
||||
def get_language(): ...
|
||||
def get_language_bidi() -> bool: ...
|
||||
def check_for_language(x: str) -> bool: ...
|
||||
def get_language_from_request(request: None, check_path: bool = ...) -> str: ...
|
||||
def get_language_from_path(request: str) -> None: ...
|
||||
def get_supported_language_variant(
|
||||
lang_code: str, strict: bool = ...
|
||||
) -> str: ...
|
||||
53
django-stubs-generated/utils/translation/trans_real.pyi
Normal file
53
django-stubs-generated/utils/translation/trans_real.pyi
Normal file
@@ -0,0 +1,53 @@
|
||||
import gettext as gettext_module
|
||||
from collections import OrderedDict
|
||||
from gettext import NullTranslations
|
||||
from typing import Any, List, Optional, Tuple
|
||||
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
|
||||
CONTEXT_SEPARATOR: str
|
||||
accept_language_re: Any
|
||||
language_code_re: Any
|
||||
language_code_prefix_re: Any
|
||||
|
||||
def reset_cache(**kwargs: Any) -> None: ...
|
||||
|
||||
class DjangoTranslation(gettext_module.GNUTranslations):
|
||||
domain: str = ...
|
||||
plural: Callable = ...
|
||||
def __init__(
|
||||
self,
|
||||
language: str,
|
||||
domain: Optional[str] = ...,
|
||||
localedirs: Optional[List[str]] = ...,
|
||||
) -> None: ...
|
||||
def merge(self, other: NullTranslations) -> None: ...
|
||||
def language(self): ...
|
||||
def to_language(self) -> str: ...
|
||||
|
||||
def translation(language: str) -> DjangoTranslation: ...
|
||||
def activate(language: str) -> None: ...
|
||||
def deactivate() -> None: ...
|
||||
def deactivate_all() -> None: ...
|
||||
def get_language() -> Optional[str]: ...
|
||||
def get_language_bidi() -> bool: ...
|
||||
def catalog(): ...
|
||||
def gettext(message: str) -> str: ...
|
||||
def pgettext(context: str, message: str) -> str: ...
|
||||
def gettext_noop(message: str) -> str: ...
|
||||
def do_ntranslate(
|
||||
singular: str, plural: str, number: float, translation_function: str
|
||||
) -> str: ...
|
||||
def ngettext(singular: str, plural: str, number: float) -> str: ...
|
||||
def npgettext(context: str, singular: str, plural: str, number: int) -> str: ...
|
||||
def all_locale_paths() -> List[str]: ...
|
||||
def check_for_language(lang_code: Optional[str]) -> bool: ...
|
||||
def get_languages() -> OrderedDict: ...
|
||||
def get_supported_language_variant(
|
||||
lang_code: Optional[str], strict: bool = ...
|
||||
) -> str: ...
|
||||
def get_language_from_path(path: str, strict: bool = ...) -> Optional[str]: ...
|
||||
def get_language_from_request(
|
||||
request: WSGIRequest, check_path: bool = ...
|
||||
) -> str: ...
|
||||
def parse_accept_lang_header(lang_string: str) -> Tuple: ...
|
||||
44
django-stubs-generated/utils/tree.pyi
Normal file
44
django-stubs-generated/utils/tree.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.db.models.fields.related_lookups import RelatedLookupMixin
|
||||
from django.db.models.lookups import BuiltinLookup, FieldGetDbPrepValueMixin
|
||||
from django.db.models.sql.where import ExtraWhere, NothingNode
|
||||
|
||||
|
||||
class Node:
|
||||
default: str = ...
|
||||
children: Union[
|
||||
List[Tuple[str, int]], List[django.db.models.lookups.Contains]
|
||||
] = ...
|
||||
connector: str = ...
|
||||
negated: bool = ...
|
||||
def __init__(
|
||||
self,
|
||||
children: Optional[
|
||||
Union[
|
||||
List[Dict[str, str]],
|
||||
List[Tuple[str, List[User]]],
|
||||
List[RelatedLookupMixin],
|
||||
List[BuiltinLookup],
|
||||
List[FieldGetDbPrepValueMixin],
|
||||
List[NothingNode],
|
||||
List[Node],
|
||||
]
|
||||
] = ...,
|
||||
connector: Optional[str] = ...,
|
||||
negated: bool = ...,
|
||||
) -> None: ...
|
||||
def __deepcopy__(self, memodict: Dict[Any, Any]) -> Node: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __contains__(self, other: Tuple[str, int]) -> bool: ...
|
||||
def __eq__(
|
||||
self,
|
||||
other: Union[
|
||||
Tuple[str, List[Any]], BuiltinLookup, ExtraWhere, NothingNode, Node
|
||||
],
|
||||
) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def add(self, data: Any, conn_type: str, squash: bool = ...) -> Any: ...
|
||||
def negate(self) -> None: ...
|
||||
17
django-stubs-generated/utils/version.pyi
Normal file
17
django-stubs-generated/utils/version.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any, Optional, Tuple
|
||||
|
||||
PY36: Any
|
||||
PY37: Any
|
||||
PY38: Any
|
||||
PY39: Any
|
||||
|
||||
def get_version(
|
||||
version: Optional[Tuple[int, int, int, str, int]] = ...
|
||||
) -> str: ...
|
||||
def get_main_version(version: Tuple[int, int, int, str, int] = ...) -> str: ...
|
||||
def get_complete_version(
|
||||
version: Optional[Tuple[int, int, int, str, int]] = ...
|
||||
) -> Tuple[int, int, int, str, int]: ...
|
||||
def get_docs_version(version: None = ...) -> str: ...
|
||||
def get_git_changeset(): ...
|
||||
def get_version_tuple(version: str) -> Tuple[int, int, int]: ...
|
||||
15
django-stubs-generated/utils/xmlutils.pyi
Normal file
15
django-stubs-generated/utils/xmlutils.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Any, Dict, Optional
|
||||
from xml.sax.saxutils import XMLGenerator
|
||||
|
||||
|
||||
class UnserializableContentError(ValueError): ...
|
||||
|
||||
class SimplerXMLGenerator(XMLGenerator):
|
||||
def addQuickElement(
|
||||
self,
|
||||
name: str,
|
||||
contents: Optional[str] = ...,
|
||||
attrs: Optional[Dict[str, str]] = ...,
|
||||
) -> None: ...
|
||||
def characters(self, content: str) -> None: ...
|
||||
def startElement(self, name: str, attrs: Dict[str, str]) -> None: ...
|
||||
Reference in New Issue
Block a user