Files
django-stubs/django/template/smartif.pyi
Maxim Kurnikov 89bb6eac75 improved version
2018-07-29 20:06:41 +03:00

24 lines
749 B
Python

from django.template.defaulttags import TemplateLiteral
from typing import (
Any,
Dict,
List,
Optional,
Union,
)
class IfParser:
def __init__(self, tokens: Any) -> None: ...
def create_var(self, value: Optional[Union[List[int], int]]) -> Literal: ...
def expression(self, rbp: int = ...) -> Literal: ...
def next_token(self) -> Literal: ...
def parse(self) -> TemplateLiteral: ...
def translate_token(self, token: Union[str, List[int], int]) -> Literal: ...
class Literal:
def __init__(self, value: Optional[int]) -> None: ...
def __repr__(self) -> str: ...
def eval(self, context: Dict[Any, Any]) -> Optional[Union[List[int], int]]: ...
def nud(self, parser: IfParser) -> Literal: ...