You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Right now any rate limited endpoints need to be provided the request parameter to function properly per the docs. It's not currently possible to rename this parameter to anything other than request. If a type hint of Request is provided for the parameter, it should be be allowed to be named _ for example so that we can avoid linter errors saying Parameter 'request' is not used
To Reproduce
@app.post('/v0/login')@limiter.limit('5/hour')def_serve_login_endpoint(
request: Request, # This throws a linter error with ruff `Parameter 'request' value is not used`
...):
...
Renaming the request parameter to _ raises on exception Exception: No "request" or "websocket" argument on function "<function _serve_login_endpoint at 0x76e2501042c0>"
Describe the bug
Right now any rate limited endpoints need to be provided the
request
parameter to function properly per the docs. It's not currently possible to rename this parameter to anything other thanrequest
. If a type hint ofRequest
is provided for the parameter, it should be be allowed to be named_
for example so that we can avoid linter errors sayingParameter 'request' is not used
To Reproduce
Renaming the
request
parameter to_
raises on exceptionException: No "request" or "websocket" argument on function "<function _serve_login_endpoint at 0x76e2501042c0>"
Expected behavior
Renaming the
request
parameter to_
and providing a type hint ofRequest
should not throw the above exception.Your app (please complete the following information):
The text was updated successfully, but these errors were encountered: