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

Add resolving of types that use TYPE_CHECKING blocks #344

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

mauvilsa
Copy link
Member

@mauvilsa mauvilsa commented Aug 8, 2023

What does this PR do?

Fixes #337.

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)

@mauvilsa mauvilsa added the enhancement New feature or request label Aug 8, 2023
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (68c1c1d) 100.00% compared to head (e5cfe52) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #344   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         5570      5646   +76     
=========================================
+ Hits          5570      5646   +76     
Flag Coverage Δ
py3.10 87.70% <92.85%> (+1.10%) ⬆️
py3.10_all 98.86% <92.85%> (+0.51%) ⬆️
py3.10_types 98.86% <92.85%> (+0.51%) ⬆️
py3.11 87.69% <92.85%> (+1.10%) ⬆️
py3.11_all 98.84% <92.85%> (+0.51%) ⬆️
py3.11_types 98.84% <92.85%> (+0.51%) ⬆️
py3.6 85.07% <16.66%> (-0.96%) ⬇️
py3.6_all 96.67% <17.85%> (-1.15%) ⬇️
py3.7 88.26% <100.00%> (+0.27%) ⬆️
py3.7_all 99.57% <100.00%> (+0.09%) ⬆️
py3.7_types 99.55% <100.00%> (+0.09%) ⬆️
py3.8 88.41% <100.00%> (+0.26%) ⬆️
py3.8_all 99.62% <100.00%> (+0.09%) ⬆️
py3.8_types 99.61% <100.00%> (+0.09%) ⬆️
py3.9 88.27% <100.00%> (+0.19%) ⬆️
py3.9_all 99.52% <100.00%> (-0.02%) ⬇️
py3.9_types 99.52% <100.00%> (-0.02%) ⬇️

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

Files Changed Coverage Δ
jsonargparse/_parameter_resolvers.py 100.00% <100.00%> (ø)
jsonargparse/_postponed_annotations.py 100.00% <100.00%> (ø)
jsonargparse/_stubs_resolver.py 100.00% <100.00%> (ø)

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

jsonargparse/_postponed_annotations.py Fixed Show fixed Hide fixed
jsonargparse_tests/test_postponed_annotations.py Dismissed Show dismissed Hide dismissed
- Improved resolving of nested forward reference types.
@mauvilsa mauvilsa force-pushed the issue-337-type-checking-blocks branch from 445801c to e5cfe52 Compare August 17, 2023 04:47
@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mauvilsa mauvilsa merged commit dc6b4c4 into main Aug 17, 2023
16 checks passed
@mauvilsa mauvilsa deleted the issue-337-type-checking-blocks branch August 17, 2023 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested class instantiation fails for classes with typehints unsupported by jsonargparse
1 participant