fix(lint): address mypy errors in api/middleware
What does this merge request do and why?
This addressed mypy errors in api/middleware folder.
❯ make check-mypy
Installing lint dependencies...
Installing dependencies from lock file
No dependencies to install or update
Installing the current project: ai_gateway (0.1.0)
Running mypy check...
ai_gateway/api/middleware/model_config.py:22: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
ai_gateway/api/middleware/model_config.py:27: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
ai_gateway/api/middleware/base.py:279: error: Item "None" of "str | None" has no attribute "partition" [union-attr]
Found 1 error in 1 file (checked 284 source files)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Contributes to #715 (closed)
Edited by Tan Le