1934
|
1 # Stubs for cyclone.template (Python 3)
|
|
2 #
|
|
3 # NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
4
|
|
5 from typing import Any, Optional
|
|
6
|
|
7 class Template:
|
|
8 name: Any = ...
|
|
9 autoescape: Any = ...
|
|
10 namespace: Any = ...
|
|
11 file: Any = ...
|
|
12 code: Any = ...
|
|
13 loader: Any = ...
|
|
14 compiled: Any = ...
|
|
15 def __init__(self, template_string: Any, name: str = ..., loader: Optional[Any] = ..., compress_whitespace: Optional[Any] = ..., autoescape: Any = ...) -> None: ...
|
|
16 def generate(self, **kwargs: Any): ...
|
|
17
|
|
18 class BaseLoader:
|
|
19 autoescape: Any = ...
|
|
20 namespace: Any = ...
|
|
21 templates: Any = ...
|
|
22 lock: Any = ...
|
|
23 def __init__(self, autoescape: Any = ..., namespace: Optional[Any] = ...) -> None: ...
|
|
24 def reset(self) -> None: ...
|
|
25 def resolve_path(self, name: Any, parent_path: Optional[Any] = ...) -> None: ...
|
|
26 def load(self, name: Any, parent_path: Optional[Any] = ...): ...
|
|
27
|
|
28 class Loader(BaseLoader):
|
|
29 root: Any = ...
|
|
30 def __init__(self, root_directory: Any, **kwargs: Any) -> None: ...
|
|
31 def resolve_path(self, name: Any, parent_path: Optional[Any] = ...): ...
|
|
32
|
|
33 class DictLoader(BaseLoader):
|
|
34 dict: Any = ...
|
|
35 def __init__(self, dict: Any, **kwargs: Any) -> None: ...
|
|
36 def resolve_path(self, name: Any, parent_path: Optional[Any] = ...): ...
|
|
37
|
|
38 class _Node:
|
|
39 def each_child(self): ...
|
|
40 def generate(self, writer: Any) -> None: ...
|
|
41 def find_named_blocks(self, loader: Any, named_blocks: Any) -> None: ...
|
|
42 def maybe_deferred(self, varName: Any, writer: Any) -> None: ...
|
|
43
|
|
44 class _File(_Node):
|
|
45 template: Any = ...
|
|
46 body: Any = ...
|
|
47 line: int = ...
|
|
48 def __init__(self, template: Any, body: Any) -> None: ...
|
|
49 def generate(self, writer: Any): ...
|
|
50 def each_child(self): ...
|
|
51
|
|
52 class _ChunkList(_Node):
|
|
53 chunks: Any = ...
|
|
54 def __init__(self, chunks: Any) -> None: ...
|
|
55 def generate(self, writer: Any) -> None: ...
|
|
56 def each_child(self): ...
|
|
57
|
|
58 class _NamedBlock(_Node):
|
|
59 name: Any = ...
|
|
60 body: Any = ...
|
|
61 template: Any = ...
|
|
62 line: Any = ...
|
|
63 parent: Any = ...
|
|
64 def __init__(self, name: Any, body: Any, template: Any, line: Any) -> None: ...
|
|
65 def each_child(self): ...
|
|
66 def generate(self, writer: Any, force_self: bool = ...) -> None: ...
|
|
67 def find_named_blocks(self, loader: Any, named_blocks: Any) -> None: ...
|
|
68
|
|
69 class _ExtendsBlock(_Node):
|
|
70 name: Any = ...
|
|
71 def __init__(self, name: Any) -> None: ...
|
|
72
|
|
73 class _Super(_Node):
|
|
74 parent: Any = ...
|
|
75 template: Any = ...
|
|
76 suffix: Any = ...
|
|
77 line: Any = ...
|
|
78 def __init__(self, template: Any, suffix: Any, line: Any) -> None: ...
|
|
79 def set_parent_block(self, parent: Any) -> None: ...
|
|
80 def generate(self, writer: Any) -> None: ...
|
|
81
|
|
82 class _IncludeBlock(_Node):
|
|
83 name: Any = ...
|
|
84 template_name: Any = ...
|
|
85 line: Any = ...
|
|
86 def __init__(self, name: Any, reader: Any, line: Any) -> None: ...
|
|
87 def find_named_blocks(self, loader: Any, named_blocks: Any) -> None: ...
|
|
88 def generate(self, writer: Any) -> None: ...
|
|
89
|
|
90 class _ApplyBlock(_Node):
|
|
91 method: Any = ...
|
|
92 line: Any = ...
|
|
93 body: Any = ...
|
|
94 def __init__(self, method: Any, line: Any, body: Optional[Any] = ...) -> None: ...
|
|
95 def each_child(self): ...
|
|
96 def generate(self, writer: Any) -> None: ...
|
|
97
|
|
98 class _ControlBlock(_Node):
|
|
99 statement: Any = ...
|
|
100 line: Any = ...
|
|
101 body: Any = ...
|
|
102 def __init__(self, statement: Any, line: Any, body: Optional[Any] = ...) -> None: ...
|
|
103 def each_child(self): ...
|
|
104 def generate(self, writer: Any) -> None: ...
|
|
105
|
|
106 class _IntermediateControlBlock(_Node):
|
|
107 statement: Any = ...
|
|
108 line: Any = ...
|
|
109 def __init__(self, statement: Any, line: Any) -> None: ...
|
|
110 def generate(self, writer: Any) -> None: ...
|
|
111
|
|
112 class _Statement(_Node):
|
|
113 statement: Any = ...
|
|
114 line: Any = ...
|
|
115 def __init__(self, statement: Any, line: Any) -> None: ...
|
|
116 def generate(self, writer: Any) -> None: ...
|
|
117
|
|
118 class _Expression(_Node):
|
|
119 expression: Any = ...
|
|
120 line: Any = ...
|
|
121 raw: Any = ...
|
|
122 def __init__(self, expression: Any, line: Any, raw: bool = ...) -> None: ...
|
|
123 def generate(self, writer: Any) -> None: ...
|
|
124
|
|
125 class _Module(_Expression):
|
|
126 def __init__(self, expression: Any, line: Any) -> None: ...
|
|
127
|
|
128 class _Text(_Node):
|
|
129 value: Any = ...
|
|
130 line: Any = ...
|
|
131 def __init__(self, value: Any, line: Any) -> None: ...
|
|
132 def generate(self, writer: Any) -> None: ...
|
|
133
|
|
134 class ParseError(Exception): ...
|
|
135 class TemplateError(Exception): ...
|
|
136
|
|
137 class _CodeWriter:
|
|
138 file: Any = ...
|
|
139 named_blocks: Any = ...
|
|
140 loader: Any = ...
|
|
141 current_template: Any = ...
|
|
142 compress_whitespace: Any = ...
|
|
143 apply_counter: int = ...
|
|
144 include_stack: Any = ...
|
|
145 def __init__(self, file: Any, named_blocks: Any, loader: Any, current_template: Any, compress_whitespace: Any) -> None: ...
|
|
146 def indent_size(self): ...
|
|
147 def indent(self) -> None: ...
|
|
148 def include(self, template: Any, line: Any) -> None: ...
|
|
149 def write_line(self, line: Any, line_number: Any, indent: Optional[Any] = ...) -> None: ...
|
|
150
|
|
151 class _TemplateReader:
|
|
152 name: Any = ...
|
|
153 text: Any = ...
|
|
154 line: int = ...
|
|
155 pos: int = ...
|
|
156 def __init__(self, name: Any, text: Any) -> None: ...
|
|
157 def find(self, needle: Any, start: int = ..., end: Optional[Any] = ...): ...
|
|
158 def consume(self, count: Optional[Any] = ...): ...
|
|
159 def remaining(self): ...
|
|
160 def __len__(self): ...
|
|
161 def __getitem__(self, key: Any): ...
|