fastapi-utils
fastapi-utils copied to clipboard
Fixed 'None' and 'NoReturn' bug in inferring router.
Fixes #172.
Note that the comparison must be done using type
since None
is a special typehint case. Python documentation states:
Note that
None
as a type hint is a special case and is replaced bytype(None)
."
Referenced here.
@dmontagu Any chance you could take a look at this?
I have slayed this bug in this PR
Closing this now that this return type annotation is used in newer versions of FastAPI.
Please let me know if this addresses other issues not handled by FastAPI and I should re-add support.