Skip to content

Protect in case the response source is None #906

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

Closed

Conversation

Leemur89
Copy link

In some cases the response source is None, resulting in return cast(Any,) which obviously does not work

In some cases the response.source can be None, which resulted in `cast(Any,)`
Also, `response.source` seems to not have `attribute`, resulting in an empty scope (might need further check)
@Leemur89 Leemur89 force-pushed the Leemur89-fix-parse-response branch from 7ff39d6 to 33b14a6 Compare December 15, 2023 10:35
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f0cf8d2) 100.00% compared to head (33b14a6) 100.00%.
Report is 12 commits behind head on main.

❗ Current head 33b14a6 differs from pull request most recent head 10f5771. Consider uploading reports for the commit 10f5771 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #906   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1940      1940           
=========================================
  Hits          1940      1940           

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

@dbanty
Copy link
Collaborator

dbanty commented Dec 15, 2023

Thanks @Leemur89! Could you also add a test case to the end_to_end_tests so we can prevent this regression in the future? There should be instructions in CONTRIBUTING.md

@dbanty dbanty added the 🐞bug Something isn't working label Dec 15, 2023
@dbanty
Copy link
Collaborator

dbanty commented Jan 5, 2024

I don't think this is an issue anymore since the response refactoring in 0.17, so I'm going to close it. If it's still an issue, please reopen with a sample OpenAPI document

@dbanty dbanty closed this Jan 5, 2024
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 this pull request may close these issues.

2 participants