-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Guideline regarding docstring (+ automatic code formatting?) #720
Comments
I believe that in ipython, jupyter or sphinx rendering, all of those variants will look the same, so I wouldn't worry much about it. Generally, we are following numpydoc, full descriptions here.
It would be reasonable to require some standard linting (flake8, black, isort) via pre-commit or otherwise. Obviously, implementing this would change most of the function blocks and make all current PRs very hard to merge - so the timing of formatting introduction is very sensitive. The lack of these tools here is a result of this repo being older than most of mine, but still single-handedly maintained. |
Thanks a lot @martindurant , I will do my best to follow them. I have started doing so in the on-going PR #712
I understand. Let's do this when the opportunity arises... a bit later once current PRs are done with. |
As much as possible taken into account in #712 |
Hi,
Please, as I am working on a PR (and this is likely not the last ;)), I would like to have guidance regarding acceptable formatting for the docstring of the functions.
I can see different formattings for the begining of the docstring. Please, which one should be retained?
(all the remaining of the docstring is the same for all examples, but if you would like to share recommandations / guidelines for the remaining of the docstring, please, do so)
Please, which formatting should be followed?
Also, regarding the code formating itself, I can see that some codes use in pre-commit some automatic python code formatter. (black formatter for instance). Do you think we should investigate this? (I had a look at black documentation quickly, and it is stated it does not format comments or docstring, hence my questions above)
Thanks for the feedback!
Bests,
The text was updated successfully, but these errors were encountered: