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

Improve response handling and type annotations #742

Conversation

robertschweizer
Copy link
Contributor

See individual commits for details

@robertschweizer robertschweizer force-pushed the improve-return-type-annotations branch from c9964ee to 204e2c8 Compare March 27, 2023 08:58
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4e0912f) to head (afa1de3).
Report is 229 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #742   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1978      1985    +7     
=========================================
+ Hits          1978      1985    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robertschweizer robertschweizer force-pushed the improve-return-type-annotations branch from 204e2c8 to 81de00f Compare March 27, 2023 15:33
We know the type of this: It's `None`, so we don't need to annotate it
as `Any`.
cast(None, None) made mypy fail after that last commit.
It makes sense to return the parsed JSON here instead of None.
This was introduced in "fix: Make empty response a `NoneProperty`",
but is easier to fix now since parsed_responses in
endpoint_module.py.jinja does not include `Any` response types anymore.
Also prevents double return type annotations like `Optional[None]`.
@robertschweizer robertschweizer force-pushed the improve-return-type-annotations branch from 90aba2c to afa1de3 Compare April 1, 2023 17:02
@dbanty dbanty closed this Dec 24, 2024
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