Improve authentication.requires
typings
#1662
-
I've noticed that After applying So, I propose to change that. From what I can tell, from starlette.authentication import requires
from starlette.responses import PlainTextResponse
from starlette.requests import Request
@requires(['authenticated', 'admin'])
async def dashboard(request: Request) -> PlainTextResponse:
return PlainTextResponse('Hello, world!')
reveal_type(dashboard)
# Before:
# note: Revealed type is "Any"
# After:
# note: Revealed type is "def (request: Request) -> typing.Coroutine[Any, Any, PlainTextResponse]" Reference PR: #1659 |
Beta Was this translation helpful? Give feedback.
Answered by
Kludex
Jan 14, 2024
Replies: 1 comment
-
The PR was accepted. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The PR was accepted.