@@ -14,13 +14,13 @@ class App:
14
14
"""
15
15
pass
16
16
17
- def setup (self , callback : Callable [[Any ], None | Awaitable [None ]]) -> None :
17
+ def setup (self , callback : Callable [[Any ], None | Awaitable [None ]], / ) -> None :
18
18
"""
19
19
Set a callback to run when server starts right after database is connected.
20
20
"""
21
21
pass
22
22
23
- def program (self , name : str , callback : Callable [[Any ], None | Awaitable [None ]]) -> None :
23
+ def program (self , name : str , callback : Callable [[Any ], None | Awaitable [None ]], / ) -> None :
24
24
"""
25
25
Define a custom program with `name`. The programs can be triggered with `teo run` command.
26
26
"""
@@ -61,115 +61,115 @@ class Namespace:
61
61
"""
62
62
...
63
63
64
- def namespace (self , name : str ) -> Optional [Namespace ]:
64
+ def namespace (self , name : str , / ) -> Optional [Namespace ]:
65
65
"""
66
66
Get a child namespace by name.
67
67
"""
68
68
...
69
69
70
- def namespace_or_create (self , name : str ) -> Namespace :
70
+ def namespace_or_create (self , name : str , / ) -> Namespace :
71
71
"""
72
72
Get a child namespace by name or create a new one with name.
73
73
"""
74
74
...
75
75
76
- def namespace_at_path (self , path : list [str ]) -> Optional [Namespace ]:
76
+ def namespace_at_path (self , path : list [str ], / ) -> Optional [Namespace ]:
77
77
"""
78
78
Get a child namespace by path.
79
79
"""
80
80
...
81
81
82
- def namespace_or_create_at_path (self , path : list [str ]) -> Namespace :
82
+ def namespace_or_create_at_path (self , path : list [str ], / ) -> Namespace :
83
83
"""
84
84
Get a child namespace by path or create a new one with path.
85
85
"""
86
86
...
87
87
88
- def define_model_decorator (self , name : str , callback : Callable [[Model ], None ]) -> None :
88
+ def define_model_decorator (self , name : str , callback : Callable [[Model ], None ], / ) -> None :
89
89
"""
90
90
Define a model decorator.
91
91
"""
92
92
...
93
93
94
- def define_model_field_decorator (self , name : str , callback : Callable [[Field ], None ]) -> None :
94
+ def define_model_field_decorator (self , name : str , callback : Callable [[Field ], None ], / ) -> None :
95
95
"""
96
96
Define a model field decorator.
97
97
"""
98
98
...
99
99
100
- def define_model_relation_decorator (self , name : str , callback : Callable [[Relation ], None ]) -> None :
100
+ def define_model_relation_decorator (self , name : str , callback : Callable [[Relation ], None ], / ) -> None :
101
101
"""
102
102
Define a model relation decorator.
103
103
"""
104
104
...
105
105
106
- def define_model_property_decorator (self , name : str , callback : Callable [[Property ], None ]) -> None :
106
+ def define_model_property_decorator (self , name : str , callback : Callable [[Property ], None ], / ) -> None :
107
107
"""
108
108
Define a model property decorator.
109
109
"""
110
110
...
111
111
112
- def define_enum_decorator (self , name : str , callback : Callable [[Enum ], None ]) -> None :
112
+ def define_enum_decorator (self , name : str , callback : Callable [[Enum ], None ], / ) -> None :
113
113
"""
114
114
Define a enum decorator.
115
115
"""
116
116
...
117
117
118
- def define_enum_member_decorator (self , name : str , callback : Callable [[EnumMember ], None ]) -> None :
118
+ def define_enum_member_decorator (self , name : str , callback : Callable [[EnumMember ], None ], / ) -> None :
119
119
"""
120
120
Define a enum member decorator.
121
121
"""
122
122
...
123
123
124
- def define_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], Any | Awaitable [Any ]]) -> None :
124
+ def define_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], Any | Awaitable [Any ]], / ) -> None :
125
125
"""
126
126
Define a pipeline item.
127
127
"""
128
128
...
129
129
130
- def define_transform_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], Any | Awaitable [Any ]]) -> None :
130
+ def define_transform_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], Any | Awaitable [Any ]], / ) -> None :
131
131
"""
132
132
Define a transform pipeline item.
133
133
"""
134
134
...
135
135
136
- def define_validator_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], str | bool | None | Awaitable [str | bool | None ]]) -> None :
136
+ def define_validator_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], str | bool | None | Awaitable [str | bool | None ]], / ) -> None :
137
137
"""
138
138
Define a validator pipeline item.
139
139
"""
140
140
...
141
141
142
- def define_callback_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], None | Awaitable [None ]]) -> None :
142
+ def define_callback_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any ], None | Awaitable [None ]], / ) -> None :
143
143
"""
144
144
Define a callback pipeline item.
145
145
"""
146
146
...
147
147
148
- def define_compare_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any , Any ], str | bool | None | Awaitable [str | bool | None ]]) -> None :
148
+ def define_compare_pipeline_item (self , name : str , callback : Callable [[Any , Any , Any , Any , Any ], str | bool | None | Awaitable [str | bool | None ]], / ) -> None :
149
149
"""
150
150
Define a compare pipeline item.
151
151
"""
152
152
...
153
153
154
- def define_handler (self , name : str , callback : Callable [[Request , Any , Any ], Response | Awaitable [Response ]]) -> None :
154
+ def define_handler (self , name : str , callback : Callable [[Request , Any , Any ], Response | Awaitable [Response ]], / ) -> None :
155
155
"""
156
156
Define a handler.
157
157
"""
158
158
...
159
159
160
- def define_handler_group (self , name : str , callback : Callable [[HandlerGroup ], None ]) -> None :
160
+ def define_handler_group (self , name : str , callback : Callable [[HandlerGroup ], None ], / ) -> None :
161
161
"""
162
162
Define a handler group with callback.
163
163
"""
164
164
...
165
165
166
- def define_model_handler_group (self , name : str , callback : Callable [[HandlerGroup ], None ]) -> None :
166
+ def define_model_handler_group (self , name : str , callback : Callable [[HandlerGroup ], None ], / ) -> None :
167
167
"""
168
168
Define a model handler group with callback.
169
169
"""
170
170
...
171
171
172
- def define_middleware (self , name : str , callback : Callable [[Any ], Callable [[RequestCtx , Callable [[RequestCtx ], Awaitable [Response ]]], Awaitable [Response ]]]) -> None :
172
+ def define_middleware (self , name : str , callback : Callable [[Any ], Callable [[RequestCtx , Callable [[RequestCtx ], Awaitable [Response ]]], Awaitable [Response ]]], / ) -> None :
173
173
"""
174
174
Define a middleware.
175
175
"""
@@ -180,7 +180,7 @@ class HandlerGroup:
180
180
A handler group contains handlers and it takes a namespace in the request URL.
181
181
"""
182
182
183
- def define_handler (self , name : str , callback : Callable [[Request , Any , Any ], Response | Awaitable [Response ]]) -> None :
183
+ def define_handler (self , name : str , callback : Callable [[Request , Any , Any ], Response | Awaitable [Response ]], / ) -> None :
184
184
"""
185
185
Define a handler.
186
186
"""
@@ -191,13 +191,13 @@ class Model:
191
191
A model in Teo schema.
192
192
"""
193
193
194
- def set_data (self , key : str , value : Any ) -> None :
194
+ def set_data (self , key : str , value : Any , / ) -> None :
195
195
"""
196
196
Attach custom data with key to this model.
197
197
"""
198
198
...
199
199
200
- def data (self , key : str ) -> Optional [Any ]:
200
+ def data (self , key : str , / ) -> Optional [Any ]:
201
201
"""
202
202
Get attached custom data by key.
203
203
"""
@@ -208,13 +208,13 @@ class Field:
208
208
A model field in Teo schema.
209
209
"""
210
210
211
- def set_data (self , key : str , value : Any ) -> None :
211
+ def set_data (self , key : str , value : Any , / ) -> None :
212
212
"""
213
213
Attach custom data with key to this model field.
214
214
"""
215
215
...
216
216
217
- def data (self , key : str ) -> Optional [Any ]:
217
+ def data (self , key : str , / ) -> Optional [Any ]:
218
218
"""
219
219
Get attached custom data by key.
220
220
"""
@@ -225,13 +225,13 @@ class Relation:
225
225
A model relation in Teo schema.
226
226
"""
227
227
228
- def set_data (self , key : str , value : Any ) -> None :
228
+ def set_data (self , key : str , value : Any , / ) -> None :
229
229
"""
230
230
Attach custom data with key to this model relation.
231
231
"""
232
232
...
233
233
234
- def data (self , key : str ) -> Optional [Any ]:
234
+ def data (self , key : str , / ) -> Optional [Any ]:
235
235
"""
236
236
Get attached custom data by key.
237
237
"""
@@ -242,13 +242,13 @@ class Property:
242
242
A model property in Teo schema.
243
243
"""
244
244
245
- def set_data (self , key : str , value : Any ) -> None :
245
+ def set_data (self , key : str , value : Any , / ) -> None :
246
246
"""
247
247
Attach custom data with key to this model property.
248
248
"""
249
249
...
250
250
251
- def data (self , key : str ) -> Optional [Any ]:
251
+ def data (self , key : str , / ) -> Optional [Any ]:
252
252
"""
253
253
Get attached custom data by key.
254
254
"""
@@ -259,13 +259,13 @@ class Enum:
259
259
An enum in Teo schema.
260
260
"""
261
261
262
- def set_data (self , key : str , value : Any ) -> None :
262
+ def set_data (self , key : str , value : Any , / ) -> None :
263
263
"""
264
264
Attach custom data with key to this enum.
265
265
"""
266
266
...
267
267
268
- def data (self , key : str ) -> Optional [Any ]:
268
+ def data (self , key : str , / ) -> Optional [Any ]:
269
269
"""
270
270
Get attached custom data by key.
271
271
"""
@@ -276,13 +276,13 @@ class EnumMember:
276
276
An enum member in Teo schema.
277
277
"""
278
278
279
- def set_data (self , key : str , value : Any ) -> None :
279
+ def set_data (self , key : str , value : Any , / ) -> None :
280
280
"""
281
281
Attach custom data with key to this enum member.
282
282
"""
283
283
...
284
284
285
- def data (self , key : str ) -> Optional [Any ]:
285
+ def data (self , key : str , / ) -> Optional [Any ]:
286
286
"""
287
287
Get attached custom data by key.
288
288
"""
@@ -301,55 +301,55 @@ class Response:
301
301
...
302
302
303
303
@staticmethod
304
- def string (content : str , content_type : str ) -> Response :
304
+ def string (content : str , content_type : str , / ) -> Response :
305
305
"""
306
306
Create a string response.
307
307
"""
308
308
...
309
309
310
310
@staticmethod
311
- def teon (value : Any ) -> Response :
311
+ def teon (value : Any , / ) -> Response :
312
312
"""
313
313
Create a Teon response.
314
314
"""
315
315
...
316
316
317
317
@staticmethod
318
- def html (content : str ) -> Response :
318
+ def html (content : str , / ) -> Response :
319
319
"""
320
320
Create an HTML response.
321
321
"""
322
322
...
323
323
324
324
@staticmethod
325
- def data (value : Any ) -> Response :
325
+ def data (value : Any , / ) -> Response :
326
326
"""
327
327
Create a Teon response with `value` wrapped in `data` key.
328
328
"""
329
329
...
330
330
331
331
@staticmethod
332
- def data_meta (data : Any , meta : Any ) -> Response :
332
+ def data_meta (data : Any , meta : Any , / ) -> Response :
333
333
"""
334
334
Create a Teon response with `data` and `meta` field.
335
335
"""
336
336
...
337
337
338
338
@staticmethod
339
- def file (path : str ) -> Response :
339
+ def file (path : str , / ) -> Response :
340
340
"""
341
341
Create a file response with `path`.
342
342
"""
343
343
...
344
344
345
345
@staticmethod
346
- def redirect (path : str ) -> Response :
346
+ def redirect (path : str , / ) -> Response :
347
347
"""
348
348
Create a redirect response.
349
349
"""
350
350
...
351
351
352
- def set_code (self , code : int ) -> None :
352
+ def set_code (self , code : int , / ) -> None :
353
353
"""
354
354
Set the response' status code.
355
355
"""
@@ -426,19 +426,19 @@ class ReadWriteHeaderMap:
426
426
"""
427
427
...
428
428
429
- def contains_key (self , key : str ) -> bool :
429
+ def contains_key (self , key : str , / ) -> bool :
430
430
"""
431
431
Whether the header map contains an entry by key.
432
432
"""
433
433
...
434
434
435
- def get (self , key : str ) -> Optional [str ]:
435
+ def get (self , key : str , / ) -> Optional [str ]:
436
436
"""
437
437
Get header value by key.
438
438
"""
439
439
...
440
440
441
- def set (self , key : str , value : str ) -> None :
441
+ def set (self , key : str , value : str , / ) -> None :
442
442
"""
443
443
Set a header value.
444
444
"""
@@ -494,13 +494,13 @@ class ReadOnlyHeaderMap:
494
494
"""
495
495
...
496
496
497
- def contains_key (self , key : str ) -> bool :
497
+ def contains_key (self , key : str , / ) -> bool :
498
498
"""
499
499
Whether the header map contains an entry by key.
500
500
"""
501
501
...
502
502
503
- def get (self , key : str ) -> Optional [str ]:
503
+ def get (self , key : str , / ) -> Optional [str ]:
504
504
"""
505
505
Get header value by key.
506
506
"""
@@ -616,7 +616,7 @@ class EnumVariant:
616
616
...
617
617
618
618
@staticmethod
619
- def from_string (value : str ) -> EnumVariant :
619
+ def from_string (value : str , / ) -> EnumVariant :
620
620
...
621
621
622
622
class OptionVariant :
0 commit comments