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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

robertschweizer
Copy link
Contributor

See individual commits for details

@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #742 (afa1de3) into main (4e0912f) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #742   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1978      1985    +7     
=========================================
+ Hits          1978      1985    +7     
Impacted Files Coverage Δ
openapi_python_client/parser/openapi.py 100.00% <100.00%> (ø)
openapi_python_client/parser/responses.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.
@robertschweizer robertschweizer force-pushed the improve-return-type-annotations branch from 90aba2c to afa1de3 Compare April 1, 2023 17:02
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.

1 participant