From c4af605c5e395f25e803d00f83ebad424098bbe4 Mon Sep 17 00:00:00 2001 From: Jasper Spaans Date: Wed, 20 Nov 2024 09:41:20 +0100 Subject: [PATCH] fix(typing): use proper type for SinkCallable **kwargs --- falcon/_typing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/falcon/_typing.py b/falcon/_typing.py index d82a5bac5..c8f27c877 100644 --- a/falcon/_typing.py +++ b/falcon/_typing.py @@ -92,12 +92,14 @@ async def __call__( class SinkCallable(Protocol): - def __call__(self, req: Request, resp: Response, **kwargs: str) -> None: ... + def __call__( + self, req: Request, resp: Response, **kwargs: Optional[str] + ) -> None: ... class AsgiSinkCallable(Protocol): async def __call__( - self, req: AsgiRequest, resp: AsgiResponse, **kwargs: str + self, req: AsgiRequest, resp: AsgiResponse, **kwargs: Optional[str] ) -> None: ...