mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 10:21:14 +08:00
fixes for ci imports failures
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from enum import Enum
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union
|
||||
|
||||
from django.template.backends.dummy import TemplateStrings
|
||||
from django.template.context import Context
|
||||
from django.template.engine import Engine
|
||||
from django.template.library import Library
|
||||
@@ -38,23 +37,19 @@ class VariableDoesNotExist(Exception):
|
||||
class Origin:
|
||||
name: str = ...
|
||||
template_name: Optional[Union[bytes, str]] = ...
|
||||
loader: Optional[Union[django.template.backends.dummy.TemplateStrings, django.template.loaders.base.Loader]] = ...
|
||||
loader: Optional[Loader] = ...
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
template_name: Optional[Union[bytes, str]] = ...,
|
||||
loader: Optional[Union[TemplateStrings, Loader]] = ...,
|
||||
self, name: str, template_name: Optional[Union[bytes, str]] = ..., loader: Optional[Loader] = ...
|
||||
) -> None: ...
|
||||
def __eq__(self, other: Origin) -> bool: ...
|
||||
@property
|
||||
def loader_name(self) -> Optional[str]: ...
|
||||
|
||||
class Template:
|
||||
name: Optional[str] = ...
|
||||
origin: Origin = ...
|
||||
engine: django.template.engine.Engine = ...
|
||||
engine: Engine = ...
|
||||
source: str = ...
|
||||
nodelist: django.template.base.NodeList = ...
|
||||
nodelist: NodeList = ...
|
||||
def __init__(
|
||||
self,
|
||||
template_string: str,
|
||||
@@ -136,8 +131,8 @@ class FilterExpression:
|
||||
var: Union[Variable, SafeText] = ...
|
||||
def __init__(self, token: str, parser: Parser) -> None: ...
|
||||
def resolve(self, context: Union[Dict[str, Dict[str, str]], Context], ignore_failures: bool = ...) -> Any: ...
|
||||
@staticmethod
|
||||
def args_check(name: str, func: Callable, provided: List[Tuple[bool, Union[Variable, SafeText]]]) -> bool: ...
|
||||
args_check: Any = ...
|
||||
|
||||
class Variable:
|
||||
var: Union[Dict[Any, Any], str] = ...
|
||||
@@ -151,8 +146,9 @@ class Variable:
|
||||
class Node:
|
||||
must_be_first: bool = ...
|
||||
child_nodelists: Any = ...
|
||||
token: Any = ...
|
||||
def render(self, context: Any) -> None: ...
|
||||
origin: Origin
|
||||
token: Token = ...
|
||||
def render(self, context: Context) -> str: ...
|
||||
def render_annotated(self, context: Context) -> Union[int, str]: ...
|
||||
def __iter__(self) -> None: ...
|
||||
def get_nodes_by_type(self, nodetype: Type[Node]) -> List[Node]: ...
|
||||
@@ -174,7 +170,7 @@ def render_value_in_context(value: Any, context: Context) -> str: ...
|
||||
class VariableNode(Node):
|
||||
origin: Origin
|
||||
token: Token
|
||||
filter_expression: django.template.base.FilterExpression = ...
|
||||
filter_expression: FilterExpression = ...
|
||||
def __init__(self, filter_expression: FilterExpression) -> None: ...
|
||||
def render(self, context: Context) -> str: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user