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

Handle forward references in Type typehints #576

Merged
merged 7 commits into from
Sep 13, 2024

Conversation

EthanMarx
Copy link
Contributor

@EthanMarx EthanMarx commented Sep 13, 2024

What does this PR do?

Fixes #572

Before submitting

  • Did you read the contributing guideline?
  • Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (1bab38a) to head (abc8ae5).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #576   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         6462      6466    +4     
=========================================
+ Hits          6462      6466    +4     
Flag Coverage Δ
py3.10 85.73% <50.00%> (-0.03%) ⬇️
py3.10_all 98.70% <50.00%> (-0.04%) ⬇️
py3.10_pydantic1 48.88% <25.00%> (-0.02%) ⬇️
py3.10_pydantic2 48.66% <25.00%> (-0.02%) ⬇️
py3.10_types 98.71% <50.00%> (-0.04%) ⬇️
py3.11 85.72% <50.00%> (-0.03%) ⬇️
py3.11_all 98.66% <50.00%> (-0.04%) ⬇️
py3.11_types 98.68% <50.00%> (-0.04%) ⬇️
py3.12 85.86% <50.00%> (-0.03%) ⬇️
py3.12_all 98.66% <50.00%> (-0.04%) ⬇️
py3.12_types 98.68% <50.00%> (-0.04%) ⬇️
py3.7 86.36% <100.00%> (+<0.01%) ⬆️
py3.7_all 99.32% <100.00%> (+<0.01%) ⬆️
py3.7_types 99.37% <100.00%> (+<0.01%) ⬆️
py3.8 86.36% <100.00%> (+<0.01%) ⬆️
py3.8_all 99.33% <100.00%> (+<0.01%) ⬆️
py3.8_types 99.36% <100.00%> (+<0.01%) ⬆️
py3.9 86.29% <100.00%> (+<0.01%) ⬆️
py3.9_all 99.28% <100.00%> (+<0.01%) ⬆️
py3.9_types 99.30% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@EthanMarx
Copy link
Contributor Author

@mauvilsa Should be good now - let me know what you think

Copy link
Member

@mauvilsa mauvilsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just fix the issue identified by sonarcloud and this should be good to go.

jsonargparse/_postponed_annotations.py Outdated Show resolved Hide resolved
Co-authored-by: Mauricio Villegas <5780272+mauvilsa@users.noreply.github.com>
Copy link

sonarcloud bot commented Sep 13, 2024

@mauvilsa mauvilsa merged commit d539f42 into omni-us:main Sep 13, 2024
29 checks passed
@mauvilsa mauvilsa added the bug Something isn't working label Sep 21, 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.

Parsing TYPE_CHECKING guarded import doesn't work in combination with Type
2 participants