mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
More accurate template.Parser parse_until type (#769)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from enum import Enum
|
||||
from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Sequence, Tuple, Type, Union
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sequence, Tuple, Type, Union
|
||||
|
||||
from django.http.request import HttpRequest
|
||||
from django.template.context import Context as Context
|
||||
@@ -109,12 +109,12 @@ class Parser:
|
||||
builtins: Optional[List[Library]] = ...,
|
||||
origin: Optional[Origin] = ...,
|
||||
) -> None: ...
|
||||
def parse(self, parse_until: Optional[Tuple[str, ...]] = ...) -> NodeList: ...
|
||||
def parse(self, parse_until: Optional[Iterable[str]] = ...) -> NodeList: ...
|
||||
def skip_past(self, endtag: str) -> None: ...
|
||||
def extend_nodelist(self, nodelist: NodeList, node: Node, token: Token) -> None: ...
|
||||
def error(self, token: Token, e: Union[Exception, str]) -> Exception: ...
|
||||
def invalid_block_tag(self, token: Token, command: str, parse_until: Union[List[Any], Tuple[str]] = ...) -> Any: ...
|
||||
def unclosed_block_tag(self, parse_until: Tuple[str]) -> Any: ...
|
||||
def invalid_block_tag(self, token: Token, command: str, parse_until: Optional[Iterable[str]] = ...) -> Any: ...
|
||||
def unclosed_block_tag(self, parse_until: Iterable[str]) -> Any: ...
|
||||
def next_token(self) -> Token: ...
|
||||
def prepend_token(self, token: Token) -> None: ...
|
||||
def delete_first_token(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user