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 numpy docstrings #9

Closed
CodyCBakerPhD opened this issue Jan 18, 2024 · 2 comments · Fixed by #12
Closed

Add numpy docstrings #9

CodyCBakerPhD opened this issue Jan 18, 2024 · 2 comments · Fixed by #12
Assignees

Comments

@CodyCBakerPhD
Copy link
Member

Two methods of the class here are overrides

The __init__.py override dynamically passes all args and kwargs so that can (and should) inherit whatever docstring the parent has (no further action required on your part)

The update override does introduce an additional argument (always_callback), so something to think on here...

  • is this argument actually required? What is its effect? Is there any alternative way to handle this?
  • otherwise, will have to think on best way to handle this. The inherited docstring won't include the detail of this new parameter, and a manually defined docstring won't necessarily match up with a particular version of tqdm... This might be a case where dynamic docstring injection is actually appropriate

The other two new methods are missing docstrings and should really receive some that quickly and concisely describe how the methods should be called - tqdm appears to use NumPy docstring format, so be sure to follow that pattern

@garrettmflynn
Copy link
Collaborator

Got it, thanks for the feedback!

Looks like always_callback isn't really necessary. I'd found it on tqdm/tqdm#845 (comment) where it looked like it was used—though I don't believe that this argument is ever actually passed.

@CodyCBakerPhD
Copy link
Member Author

Oh, OK then - if that can be removed then the docstring for update can just be purely inherited, EZPZ

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 a pull request may close this issue.

2 participants