Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix: Improve typing support #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattmess1221
Copy link

All callable arguments have been updated to match how they are used in code.

Some checks have been extracted to a PEP 742 TypeIs function. A side-effect of this is typing-extensions>4.10 requires python 3.8.

The only functional changes is in moving LimitGroup.request to a function argument, which makes LimitGroup stateless and less prone to a race condition. Limit.scope was also changed from a property to a normal method so request can be passed. Additionally, Limiter.slowapi_startup() has received a parameter app: Starlette. Without it, a NameError: app would be raised when called.

All callable arguments have been updated to match how they are used in code
Some checks have been extracted to a PEP 742 TypeIs function. A side-effect of this is typing-extensions>4.10 requires python 3.8.
The only functional change is in moving LimitGroup.request to a function argument, which makes LimitGroup stateless and less prone to a race condition.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant