Skip to content

Import Optional when property is nullable or not required #177

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
wants to merge 2 commits into from

Conversation

dtkav
Copy link
Contributor

@dtkav dtkav commented Sep 3, 2020

Fixes #180

@codecov
Copy link

codecov bot commented Sep 3, 2020

Codecov Report

Merging #177 into release/0.6.0 will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/0.6.0      #177   +/-   ##
===============================================
  Coverage         100.00%   100.00%           
===============================================
  Files                 41        41           
  Lines               1271      1271           
===============================================
  Hits                1271      1271           
Impacted Files Coverage Δ
openapi_python_client/parser/properties.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2108907...783aa3f. Read the comment docs.

@dtkav dtkav changed the title fix: check for nullable or not required fix: import Optional when nullable or not required Sep 4, 2020
@dtkav dtkav changed the base branch from main to release/0.6.0 September 4, 2020 02:47
@dtkav dtkav marked this pull request as ready for review September 4, 2020 02:58
@dtkav dtkav closed this Sep 4, 2020
@dtkav dtkav reopened this Sep 4, 2020
@dtkav dtkav changed the title fix: import Optional when nullable or not required Import Optional when property is nullable or not required Sep 4, 2020
@dtkav
Copy link
Contributor Author

dtkav commented Sep 4, 2020

I'm not sure why, but codecov is reporting an error above.
When I click through to their website it seems to report 100% coverage.

@dbanty
Copy link
Collaborator

dbanty commented Sep 4, 2020

Thanks! I've cherry picked the fix to base it on main (#181) just so I can include it in a patch to 0.5 (since 0.6 will probably be a while still before final). This will go into both a 0.5.5 and a 0.6.0-alpha.2.

Regarding Codecov:
There is a single if statement that runs one way on 3.7 and a different on 3.8. CI runs on both and reports coverage on both. Codecov merges the coverages to get 100% but sometimes jumps the gun on setting build status here. Annoying but I haven't found a better way to do that yet.

@dbanty dbanty closed this Sep 4, 2020
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