falconry/falcon

Advanced typing of ASGI `scope` dict

Open

#2628 aperta il 25 apr 2026

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)Python (925 fork)batch import
enhancementgood first issuetyping

Metriche repository

Star
 (9293 star)
Metriche merge PR
 (Merge medio 2g 7h) (9 PR mergiate in 30 g)

Descrizione

Create a more advanced TypedDict or similar for annotating ASGI scope.

We could probably draw inspiration from the relevant parts of asgiref: https://github.com/django/asgiref/blob/main/asgiref/typing.py. Since these annotations are really trivial, we probably want just to reimplement the part that we use.

This would allow us to get rid of a bunch of typing ignores, see #2599.

Guida contributor