-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use the code formatter Black for tsfresh #820
Comments
I appreciate your idea on having a common style in the code. To be fair, using a common quote style is not super usual in python projects (see e.g. numpy) - but we can do this nevertheless - I do not have hard feelings against it. What I would recommend however is to use as much automation as possible to make it easier for developers to stick with the standard we chose (for example, I am working with a German keyboard where the " is easier to reach than the ' - at least on my keyboard). So I would propose to maybe go with a tool like "black" (as was suggested e.g. in #607) and add it to both the CI pipeline as well as the contribution guidelines. Just out of curiosity: I worked with several open and close source python applications so far, but I have barely never seen single quotes used for docstrings - also because PEP-257 uses double quotes. Do you know a reason why single triple quotes were chosen? |
Maybe we could add pylint with the following add-on https://github.com/edaniszewski/pylint-quotes to check this in the CI pipeline |
Related to #858 @nils-braun I finally found the time to start working on this, see #858 |
New pull request with the python package "black" applied to the tsfresh repository: |
I have renamed this issue to better reflect the changes that were made. Old name:
New name:
|
Well done and well documented! |
Thanks! 🎉 |
While working with tsfresh I've noticed that in some parts of the code, documentation, etc. single quotes (
'
) are used while in other parts double quotes ("
) are used.Examples:
01 Feature Extraction and Selection.ipynb
04 Multiclass Selection Example.ipynb
The
PEP 8 -- Style Guide for Python Code
at https://www.python.org/dev/peps/pep-0008/#string-quotes says this:The Comprehensive Knowledge Archive Network (CKAN) has a recommendation at https://docs.ckan.org/en/latest/contributing/python.html#use-single-quotes:
The same standards could be applied to docstrings, see
PEP 257 -- Docstring Conventions
at https://www.python.org/dev/peps/pep-0257/.CKAN also has a recommendation for docstrings at https://docs.ckan.org/en/latest/contributing/python.html#pep-257-docstring-conventions:
I can submit a pull request.
The text was updated successfully, but these errors were encountered: