Browse Source

🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

pull/13241/head
pre-commit-ci[bot] 3 months ago
parent
commit
30d0504835
  1. 3
      fastapi/applications.py

3
fastapi/applications.py

@ -4547,7 +4547,6 @@ class FastAPI(Starlette):
"""
),
],
*extra_exc_classes_or_status_codes: Annotated[
Union[int, Type[Exception]],
Doc(
@ -4588,11 +4587,11 @@ class FastAPI(Starlette):
)
```
"""
def decorator(func: DecoratedCallable) -> DecoratedCallable:
self.add_exception_handler(exc_class_or_status_code, func)
for extra_exc_class_or_status_code in extra_exc_classes_or_status_codes:
self.add_exception_handler(extra_exc_class_or_status_code, func)
return func
return decorator

Loading…
Cancel
Save