Skip to content

Commit a40de5a

Browse files
authored
fix(handler): fix an invalid type hint (#46)
This fixes a small type annotation error in `handler.py` -- the annotation had `ExceptionHandler or None` instead of `ExceptionHandler | None`. This isn't detected by Python's own syntax checking because of deferred annotations, but Pyright flags it.
1 parent 5a1c35c commit a40de5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fastapi_problem/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def new_exception_handler( # noqa: PLR0913
204204

205205
def add_exception_handler( # noqa: PLR0913
206206
app: FastAPI,
207-
eh: ExceptionHandler or None = None,
207+
eh: ExceptionHandler | None = None,
208208
*,
209209
logger: logging.Logger | None = None,
210210
cors: CorsConfiguration | None = None,

0 commit comments

Comments
 (0)