mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
16
django-stubs-generated/template/backends/base.pyi
Normal file
16
django-stubs-generated/template/backends/base.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
|
||||
|
||||
|
||||
class BaseEngine:
|
||||
name: Any = ...
|
||||
dirs: Any = ...
|
||||
app_dirs: Any = ...
|
||||
def __init__(
|
||||
self, params: Dict[str, Union[List[str], bool, str]]
|
||||
) -> None: ...
|
||||
@property
|
||||
def app_dirname(self) -> None: ...
|
||||
def from_string(self, template_code: Any) -> None: ...
|
||||
def get_template(self, template_name: Any) -> None: ...
|
||||
def template_dirs(self) -> Tuple[str]: ...
|
||||
def iter_template_filenames(self, template_name: str) -> Iterator[str]: ...
|
||||
41
django-stubs-generated/template/backends/django.pyi
Normal file
41
django-stubs-generated/template/backends/django.pyi
Normal file
@@ -0,0 +1,41 @@
|
||||
from typing import Any, Dict, Iterator, Optional
|
||||
|
||||
from django.http.request import HttpRequest
|
||||
from django.template.base import Origin, Template
|
||||
from django.template.exceptions import TemplateDoesNotExist
|
||||
from django.utils.safestring import SafeText
|
||||
|
||||
from .base import BaseEngine
|
||||
|
||||
|
||||
class DjangoTemplates(BaseEngine):
|
||||
app_dirs: bool
|
||||
dirs: List[str]
|
||||
name: str
|
||||
app_dirname: str = ...
|
||||
engine: django.template.engine.Engine = ...
|
||||
def __init__(self, params: Dict[str, Any]) -> None: ...
|
||||
def from_string(self, template_code: str) -> Template: ...
|
||||
def get_template(self, template_name: str) -> Template: ...
|
||||
def get_templatetag_libraries(
|
||||
self, custom_libraries: Dict[str, str]
|
||||
) -> Dict[str, str]: ...
|
||||
|
||||
class Template:
|
||||
template: django.template.base.Template = ...
|
||||
backend: django.template.backends.django.DjangoTemplates = ...
|
||||
def __init__(
|
||||
self, template: Template, backend: DjangoTemplates
|
||||
) -> None: ...
|
||||
@property
|
||||
def origin(self) -> Origin: ...
|
||||
def render(
|
||||
self, context: Any = ..., request: Optional[HttpRequest] = ...
|
||||
) -> SafeText: ...
|
||||
|
||||
def copy_exception(
|
||||
exc: TemplateDoesNotExist, backend: Optional[DjangoTemplates] = ...
|
||||
) -> TemplateDoesNotExist: ...
|
||||
def reraise(exc: TemplateDoesNotExist, backend: DjangoTemplates) -> Any: ...
|
||||
def get_installed_libraries() -> Dict[str, str]: ...
|
||||
def get_package_libraries(pkg: Any) -> Iterator[str]: ...
|
||||
28
django-stubs-generated/template/backends/dummy.pyi
Normal file
28
django-stubs-generated/template/backends/dummy.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
import string
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
from django.http.request import HttpRequest
|
||||
|
||||
from .base import BaseEngine
|
||||
from .utils import csrf_input_lazy, csrf_token_lazy
|
||||
|
||||
|
||||
class TemplateStrings(BaseEngine):
|
||||
app_dirs: bool
|
||||
dirs: List[Any]
|
||||
name: str
|
||||
template_dirs: Tuple[str]
|
||||
app_dirname: str = ...
|
||||
def __init__(
|
||||
self, params: Dict[str, Union[Dict[Any, Any], List[Any], bool, str]]
|
||||
) -> None: ...
|
||||
def from_string(self, template_code: str) -> Template: ...
|
||||
def get_template(self, template_name: str) -> Template: ...
|
||||
|
||||
class Template(string.Template):
|
||||
template: str
|
||||
def render(
|
||||
self,
|
||||
context: Optional[Dict[str, str]] = ...,
|
||||
request: Optional[HttpRequest] = ...,
|
||||
) -> str: ...
|
||||
171
django-stubs-generated/template/backends/jinja2.pyi
Normal file
171
django-stubs-generated/template/backends/jinja2.pyi
Normal file
@@ -0,0 +1,171 @@
|
||||
from datetime import time
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from jinja2.environment import Template
|
||||
from jinja2.exceptions import TemplateSyntaxError
|
||||
|
||||
from django.http.request import HttpRequest
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
from .base import BaseEngine
|
||||
|
||||
|
||||
class Jinja2(BaseEngine):
|
||||
app_dirs: bool
|
||||
dirs: List[str]
|
||||
name: str
|
||||
template_context_processors: List[Callable]
|
||||
template_dirs: Tuple[str]
|
||||
app_dirname: str = ...
|
||||
context_processors: List[str] = ...
|
||||
env: jinja2.environment.Environment = ...
|
||||
def __init__(
|
||||
self,
|
||||
params: Dict[
|
||||
str, Union[Dict[str, Union[List[str], bool]], List[str], bool, str]
|
||||
],
|
||||
) -> None: ...
|
||||
def from_string(self, template_code: str) -> Template: ...
|
||||
def get_template(self, template_name: str) -> Template: ...
|
||||
def template_context_processors(self) -> List[Callable]: ...
|
||||
|
||||
class Template:
|
||||
template: jinja2.environment.Template = ...
|
||||
backend: django.template.backends.jinja2.Jinja2 = ...
|
||||
origin: django.template.backends.jinja2.Origin = ...
|
||||
def __init__(self, template: Template, backend: Jinja2) -> None: ...
|
||||
def render(
|
||||
self,
|
||||
context: Optional[
|
||||
Union[
|
||||
Dict[
|
||||
str, Dict[str, Optional[Union[Dict[str, bool], bool, str]]]
|
||||
],
|
||||
Dict[
|
||||
str,
|
||||
Dict[
|
||||
str,
|
||||
Optional[
|
||||
Union[
|
||||
Dict[str, str],
|
||||
List[
|
||||
Dict[
|
||||
str,
|
||||
Optional[
|
||||
Union[Dict[str, str], bool, str]
|
||||
],
|
||||
]
|
||||
],
|
||||
bool,
|
||||
str,
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
Dict[
|
||||
str,
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Dict[str, int],
|
||||
List[
|
||||
Tuple[
|
||||
Optional[str],
|
||||
List[
|
||||
Dict[
|
||||
str,
|
||||
Union[Dict[str, bool], bool, str],
|
||||
]
|
||||
],
|
||||
int,
|
||||
]
|
||||
],
|
||||
List[str],
|
||||
bool,
|
||||
str,
|
||||
],
|
||||
],
|
||||
],
|
||||
Dict[
|
||||
str,
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Dict[str, str],
|
||||
List[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Dict[str, str],
|
||||
List[
|
||||
Tuple[
|
||||
None,
|
||||
List[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Dict[str, bool],
|
||||
bool,
|
||||
str,
|
||||
],
|
||||
]
|
||||
],
|
||||
int,
|
||||
]
|
||||
],
|
||||
List[str],
|
||||
bool,
|
||||
str,
|
||||
],
|
||||
]
|
||||
],
|
||||
List[str],
|
||||
bool,
|
||||
str,
|
||||
],
|
||||
],
|
||||
],
|
||||
Dict[
|
||||
str,
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Dict[str, str],
|
||||
List[
|
||||
Tuple[
|
||||
Optional[str],
|
||||
List[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Dict[str, Union[bool, str]],
|
||||
time,
|
||||
int,
|
||||
str,
|
||||
],
|
||||
]
|
||||
],
|
||||
int,
|
||||
]
|
||||
],
|
||||
List[str],
|
||||
bool,
|
||||
str,
|
||||
],
|
||||
],
|
||||
],
|
||||
Dict[str, TemplateView],
|
||||
Dict[str, str],
|
||||
]
|
||||
] = ...,
|
||||
request: Optional[HttpRequest] = ...,
|
||||
) -> str: ...
|
||||
|
||||
class Origin:
|
||||
name: str = ...
|
||||
template_name: Optional[str] = ...
|
||||
def __init__(self, name: str, template_name: Optional[str]) -> None: ...
|
||||
|
||||
def get_exception_info(
|
||||
exception: TemplateSyntaxError
|
||||
) -> Dict[str, Union[List[Tuple[int, str]], int, str]]: ...
|
||||
10
django-stubs-generated/template/backends/utils.pyi
Normal file
10
django-stubs-generated/template/backends/utils.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.http.request import HttpRequest
|
||||
from django.utils.safestring import SafeText
|
||||
|
||||
|
||||
def csrf_input(request: HttpRequest) -> SafeText: ...
|
||||
|
||||
csrf_input_lazy: Any
|
||||
csrf_token_lazy: Any
|
||||
Reference in New Issue
Block a user