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

fixed showing choices of list,tuples and set type annotations #123

Merged
merged 5 commits into from Mar 6, 2024

Conversation

OrHayat
Copy link

@OrHayat OrHayat commented Mar 5, 2024

fixed showing choices of list,tuples and set type annotations when the annotation contain single type
for example list[Literal["a","b"]]

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.41%. Comparing base (ea3528d) to head (4f4e5f7).
Report is 1 commits behind head on main.

Files Patch % Lines
cyclopts/help.py 90.00% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
- Coverage   96.45%   96.41%   -0.05%     
==========================================
  Files          16       16              
  Lines        1750     1755       +5     
  Branches      442      444       +2     
==========================================
+ Hits         1688     1692       +4     
  Misses         29       29              
- Partials       33       34       +1     
Flag Coverage Δ
unittests 96.23% <90.00%> (-0.05%) ⬇️

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.

cyclopts/help.py Outdated
@@ -190,16 +190,18 @@ def format_doc(root_app, app: "App", format: str = "restructuredtext"):


def _get_choices(type_: Type) -> str:
choices: str = ""
if get_origin(type_) is Union:
Copy link
Owner

Choose a reason for hiding this comment

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

not for this PR, but I'm willing to bet that this needs a similar fix for python3.10 pipe unions as in #80

@BrianPugh BrianPugh mentioned this pull request Mar 6, 2024
4 tasks
Copy link
Owner

@BrianPugh BrianPugh left a comment

Choose a reason for hiding this comment

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

This PR is probably victim to a few bugs I outlined in #124. I'm going to fix those in a separate PR. I will tag a release including these changes within the next day or two. Thank you for your continued contribution!

@BrianPugh
Copy link
Owner

@OrHayat I made some slight changes to a few of your tests, please let me know if you agree with the changes or if you believe the behavior should be different. Afterwards we can merge this.

@OrHayat
Copy link
Author

OrHayat commented Mar 6, 2024

sure u can merge that whenever you want

@BrianPugh BrianPugh merged commit 20edb75 into BrianPugh:main Mar 6, 2024
15 checks passed
@BrianPugh
Copy link
Owner

this has been included in v2.4.1

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.

None yet

3 participants