X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/44d5da00b520a05cd56e58b3998660f64ea59ebd..095fe0d649541636d7011e779214a146b4f32895:/src/blackd/middlewares.py?ds=sidebyside diff --git a/src/blackd/middlewares.py b/src/blackd/middlewares.py index 7abde52..e71f508 100644 --- a/src/blackd/middlewares.py +++ b/src/blackd/middlewares.py @@ -9,7 +9,7 @@ Middleware = Callable[[Request, Handler], Awaitable[StreamResponse]] def cors(allow_headers: Iterable[str]) -> Middleware: - @middleware + @middleware # type: ignore[misc] async def impl(request: Request, handler: Handler) -> StreamResponse: is_options = request.method == "OPTIONS" is_preflight = is_options and "Access-Control-Request-Method" in request.headers @@ -32,4 +32,4 @@ def cors(allow_headers: Iterable[str]) -> Middleware: return resp - return impl # type: ignore + return impl # type: ignore[no-any-return]