mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 05:51:53 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
125
django-stubs-generated/template/defaultfilters.pyi
Normal file
125
django-stubs-generated/template/defaultfilters.pyi
Normal file
@@ -0,0 +1,125 @@
|
||||
from datetime import date, datetime, timedelta
|
||||
from decimal import Decimal
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union
|
||||
|
||||
from django.utils.safestring import SafeText
|
||||
|
||||
from .base import Variable as Variable, VariableDoesNotExist as VariableDoesNotExist
|
||||
from .library import Library as Library
|
||||
|
||||
register: Any
|
||||
|
||||
def stringfilter(func: Callable) -> Callable: ...
|
||||
def addslashes(value: str) -> str: ...
|
||||
def capfirst(value: str) -> str: ...
|
||||
def escapejs_filter(value: str) -> SafeText: ...
|
||||
def json_script(value: Dict[str, str], element_id: SafeText) -> SafeText: ...
|
||||
def floatformat(
|
||||
text: Optional[Union[Decimal, float, str]], arg: Union[int, str] = ...
|
||||
) -> str: ...
|
||||
def iriencode(value: str) -> str: ...
|
||||
def linenumbers(value: str, autoescape: bool = ...) -> SafeText: ...
|
||||
def lower(value: str) -> str: ...
|
||||
def make_list(value: str) -> List[str]: ...
|
||||
def slugify(value: str) -> SafeText: ...
|
||||
def stringformat(value: Any, arg: str) -> str: ...
|
||||
def title(value: str) -> str: ...
|
||||
def truncatechars(value: str, arg: Union[SafeText, int]) -> str: ...
|
||||
def truncatechars_html(value: str, arg: Union[int, str]) -> str: ...
|
||||
def truncatewords(value: str, arg: Union[int, str]) -> str: ...
|
||||
def truncatewords_html(value: str, arg: Union[int, str]) -> str: ...
|
||||
def upper(value: str) -> str: ...
|
||||
def urlencode(value: str, safe: Optional[SafeText] = ...) -> str: ...
|
||||
def urlize(value: str, autoescape: bool = ...) -> SafeText: ...
|
||||
def urlizetrunc(
|
||||
value: str, limit: Union[SafeText, int], autoescape: bool = ...
|
||||
) -> SafeText: ...
|
||||
def wordcount(value: str) -> int: ...
|
||||
def wordwrap(value: str, arg: Union[SafeText, int]) -> str: ...
|
||||
def ljust(value: str, arg: Union[SafeText, int]) -> str: ...
|
||||
def rjust(value: str, arg: Union[SafeText, int]) -> str: ...
|
||||
def center(value: str, arg: Union[SafeText, int]) -> str: ...
|
||||
def cut(value: str, arg: str) -> str: ...
|
||||
def escape_filter(value: str) -> SafeText: ...
|
||||
def force_escape(value: str) -> SafeText: ...
|
||||
def linebreaks_filter(value: str, autoescape: bool = ...) -> SafeText: ...
|
||||
def linebreaksbr(value: str, autoescape: bool = ...) -> SafeText: ...
|
||||
def safe(value: str) -> SafeText: ...
|
||||
def safeseq(value: List[str]) -> List[SafeText]: ...
|
||||
def striptags(value: str) -> str: ...
|
||||
def dictsort(
|
||||
value: Union[
|
||||
Dict[str, int],
|
||||
List[Dict[str, Dict[str, Union[int, str]]]],
|
||||
List[Dict[str, str]],
|
||||
List[Tuple[str, str]],
|
||||
List[int],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
arg: Union[int, str],
|
||||
) -> Union[
|
||||
List[Dict[str, Dict[str, Union[int, str]]]],
|
||||
List[Dict[str, str]],
|
||||
List[Tuple[str, str]],
|
||||
str,
|
||||
]: ...
|
||||
def dictsortreversed(
|
||||
value: Union[
|
||||
Dict[str, int],
|
||||
List[Dict[str, Union[int, str]]],
|
||||
List[Tuple[str, str]],
|
||||
List[int],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
arg: Union[int, str],
|
||||
) -> Union[List[Dict[str, Union[int, str]]], List[Tuple[str, str]], str]: ...
|
||||
def first(value: Union[List[int], List[str], str]) -> Union[int, str]: ...
|
||||
def join(value: Any, arg: str, autoescape: bool = ...) -> Any: ...
|
||||
def last(value: List[str]) -> str: ...
|
||||
def length(value: Any) -> int: ...
|
||||
def length_is(
|
||||
value: Optional[Union[List[Callable], Tuple[str, str], int, str]],
|
||||
arg: Union[SafeText, int],
|
||||
) -> Union[bool, str]: ...
|
||||
def random(value: List[str]) -> str: ...
|
||||
def slice_filter(value: Any, arg: str) -> Any: ...
|
||||
def unordered_list(
|
||||
value: Union[
|
||||
Iterator[Any],
|
||||
List[Union[List[Union[List[Union[List[str], str]], str]], str]],
|
||||
],
|
||||
autoescape: bool = ...,
|
||||
) -> SafeText: ...
|
||||
def add(
|
||||
value: Union[List[int], Tuple[int, int], date, int, str],
|
||||
arg: Union[List[int], Tuple[int, int], timedelta, int, str],
|
||||
) -> Union[List[int], Tuple[int, int, int, int], date, int, str]: ...
|
||||
def get_digit(value: Union[int, str], arg: int) -> Union[int, str]: ...
|
||||
def date(
|
||||
value: Optional[Union[datetime, str]], arg: Optional[str] = ...
|
||||
) -> str: ...
|
||||
def time(
|
||||
value: Optional[Union[datetime, str]], arg: Optional[str] = ...
|
||||
) -> str: ...
|
||||
def timesince_filter(
|
||||
value: Optional[date], arg: Optional[date] = ...
|
||||
) -> str: ...
|
||||
def timeuntil_filter(
|
||||
value: Optional[date], arg: Optional[date] = ...
|
||||
) -> str: ...
|
||||
def default(
|
||||
value: Optional[Union[int, str]], arg: Union[int, str]
|
||||
) -> Union[int, str]: ...
|
||||
def default_if_none(
|
||||
value: Optional[str], arg: Union[int, str]
|
||||
) -> Union[int, str]: ...
|
||||
def divisibleby(value: int, arg: int) -> bool: ...
|
||||
def yesno(
|
||||
value: Optional[int], arg: Optional[str] = ...
|
||||
) -> Optional[Union[bool, str]]: ...
|
||||
def filesizeformat(bytes_: Union[complex, int, str]) -> str: ...
|
||||
def pluralize(value: Any, arg: str = ...) -> str: ...
|
||||
def phone2numeric_filter(value: str) -> str: ...
|
||||
def pprint(value: Any) -> str: ...
|
||||
Reference in New Issue
Block a user