Browse Source

add more specific ignore type

Co-authored-by: Motov Yurii <[email protected]>
pull/15091/head
Sofie Van Landeghem 4 months ago
committed by GitHub
parent
commit
ddc4bc5e50
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      fastapi/applications.py

4
fastapi/applications.py

@ -1006,8 +1006,8 @@ class FastAPI(Starlette):
# Starlette still has incorrect type specification for the handlers # Starlette still has incorrect type specification for the handlers
self.exception_handlers.setdefault( self.exception_handlers.setdefault(
WebSocketRequestValidationError, WebSocketRequestValidationError,
websocket_request_validation_exception_handler, # type: ignore # ty: ignore[unused-ignore-comment] websocket_request_validation_exception_handler, # type: ignore[arg-type] # ty: ignore[unused-ignore-comment]
) # ty: ignore ) # ty: ignore[no-matching-overload]
self.user_middleware: list[Middleware] = ( self.user_middleware: list[Middleware] = (
[] if middleware is None else list(middleware) [] if middleware is None else list(middleware)

Loading…
Cancel
Save