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

enhance: add type check in route.return_value setter #133

Merged
merged 2 commits into from
Mar 1, 2021
Merged

enhance: add type check in route.return_value setter #133

merged 2 commits into from
Mar 1, 2021

Conversation

tzing
Copy link
Contributor

@tzing tzing commented Feb 26, 2021

per discuss in #132, add type check in route.return_value setter

@lundberg
Copy link
Owner

Awesome!

I think we also should take the time and adjust the incorrect ValueError into to a TypeError here, since it addresses kind of the same exception, e.g. bad mock data.

@lundberg
Copy link
Owner

Actually, when I look at it, all ValueErrors and TypeErrors raised in the code are probably mixed up 😂. We should also address that in a separate PR.

@tzing
Copy link
Contributor Author

tzing commented Feb 26, 2021

Just change the ValueError to TypeError in models.py as all of them looks like this sort.
Not going to check entire module, this might be different issue.

@lundberg lundberg merged commit bd9672b into lundberg:master Mar 1, 2021
@tzing tzing deleted the hotfix/check-type branch March 2, 2021 02:09
lundberg added a commit that referenced this pull request Apr 27, 2021
Changed
- Require `HTTPX` 0.18.0 and implement the new transport API. (PR #142)
- Removed ASGI and WSGI transports from httpcore patch list. (PR #131)
- Don't pre-read mocked async resposne streams. (PR #136)

Fixed
- Fixed syntax highlighting in docs, thanks @florimondmanca. (PR #134)
- Type check `route.return_value`, thanks @tzing. (PR #133)
- Fixed a typo in the docs, thanks @lewoudar. (PR #139)

Added
- Added support for adding/removing patch targets. (PR #131)
- Added test session for python 3.10. (PR #140)
- Added RESPX Mock Swallowtail to README. (PR #128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants