Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mypy fails when exception handler is turned on #36

Closed
gcarvellas opened this issue Aug 4, 2023 · 2 comments
Closed

Mypy fails when exception handler is turned on #36

gcarvellas opened this issue Aug 4, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@gcarvellas
Copy link
Contributor

Describe the bug
mypy fails because of the exception handler in app.py. It's commented out right now but it shouldn't be.

@gcarvellas gcarvellas added the bug Something isn't working label Aug 4, 2023
@Yun-L Yun-L self-assigned this Aug 30, 2023
@Yun-L
Copy link

Yun-L commented Aug 31, 2023

the error handler decorator expects a function that returns a ResponseReturnValue, defined in https://github.com/pallets/flask/blob/ed5b240417414cbd0322efa95c91f759928ba154/src/flask/typing.py#L32

our FlaskResponseType gives us a type error, but looks like it's almost the same as ResponseValue (a subtype of ResponseReturnValue. Is there a reason why we are using our own return type for route functions instead of the flask defined one?

@gcarvellas
Copy link
Contributor Author

the error handler decorator expects a function that returns a ResponseReturnValue, defined in https://github.com/pallets/flask/blob/ed5b240417414cbd0322efa95c91f759928ba154/src/flask/typing.py#L32

our FlaskResponseType gives us a type error, but looks like it's almost the same as ResponseValue (a subtype of ResponseReturnValue. Is there a reason why we are using our own return type for route functions instead of the flask defined one?

Let's use the flask defined return types instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants