-
Notifications
You must be signed in to change notification settings - Fork 47
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
Set/fix typehints in visualize/profiles.py / visualize/reference_poin… #1223
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #1223 +/- ##
===========================================
- Coverage 88.16% 84.11% -4.06%
===========================================
Files 79 148 +69
Lines 5257 11857 +6600
===========================================
+ Hits 4635 9973 +5338
- Misses 622 1884 +1262 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes, thank you.
For my information, descriptions like profile_indices: list of integer values
are not nice, so that's why you're removing and adding them to the function input like Sequence[int]
?
@@ -15,50 +15,50 @@ def profiles( | |||
results: Union[Result, Sequence[Result]], | |||
ax=None, | |||
profile_indices: Sequence[int] = None, | |||
size: Sequence[float] = (18.5, 6.5), | |||
size: tuple[float, float] = (18.5, 6.5), | |||
reference: Union[ReferencePoint, Sequence[ReferencePoint]] = None, | |||
colors=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be colors: Sequence[tuple]
or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"or something similar" 😅
I am not completely sure which types are supported.
They are not bad per se. However, proper type annotations can be used for static code analysis, those other comments cannot. And redundancy is bad. Also, as you can see in some of the changes, those comments don't reflect the actually expected types. |
…ts.py
And remove redundant / contradictory types from docstrings