Commit 46ab186
authored
docs(examples): add type hints to things WSGI/ASGI samples (#2698)
* docs(examples): add type hints to things WSGI/ASGI samples
Annotate on_get request/response parameters in the tutorial examples
as a small first slice of #1820. No runtime behavior change.
Signed-off-by: Alex Chen <l46983284@gmail.com>
* docs(examples): type ASGI things handlers with falcon.asgi types
Use falcon.asgi.Request/Response in the ASGI sample so the annotations
match the ASGI app surface, not the WSGI base classes.
Signed-off-by: Alex Chen <l46983284@gmail.com>
* docs(examples): drop future annotations; sync README snippets
Remove unnecessary from __future__ import annotations from the short
things samples and mirror the typed responder signatures (plus ASGI
Request/Response imports) in the inline README.rst copies.
Signed-off-by: Alex Chen <l46983284@gmail.com>1 parent c1ba507 commit 46ab186
3 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
| 396 | + | |
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
399 | 401 | | |
400 | 402 | | |
401 | | - | |
| 403 | + | |
402 | 404 | | |
403 | 405 | | |
404 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | | - | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments