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

Other Docstring improvements #998

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Conversation

MarcSkovMadsen
Copy link
Collaborator

Starts from #997. Please review that one first.

Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.24%. Comparing base (210419d) to head (4c9e5e5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #998      +/-   ##
==========================================
- Coverage   87.25%   87.24%   -0.01%     
==========================================
  Files           9        9              
  Lines        4928     4932       +4     
==========================================
+ Hits         4300     4303       +3     
- Misses        628      629       +1     

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

default, doc, and precedence all default to None, which allows
inheritance of Parameter slots (attributes) from the owning-class'
class hierarchy (see ParameterizedMetaclass).
def __init__( # pylint: disable-msg=R0913
Copy link
Collaborator Author

@MarcSkovMadsen MarcSkovMadsen Dec 29, 2024

Choose a reason for hiding this comment

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

I would have like to type annotate Parameter.__init__ but because of the overloading and use of Undefined for example the type annotation of doc would become Union[str, None, _Undefined]. I'm not really sure that is helpful to users? But maybe we should define DocType=Union[str, None, _Undefined] and then use that in the ~40 places we need to use that type?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants