-
Notifications
You must be signed in to change notification settings - Fork 440
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
Code style: Black, autopep8, or yapf? #288
Comments
Interesting resource and alternative to Black: https://github.com/kenneth-reitz/white |
I agree with adding a coding style, and |
After more thoughts, I can only push towards integrating the checkers in the CIs ( I volunteer to start a PR configuring some Travis to do that and of course it will complain for a time but once this is done, the code can only be more readable and pleasant for everybody. The sooner it is done, the better I think. Work has already started in this direction in #408 |
Not really a contributor here but from my own experience using Black really makes the contribution process a lot easier. I don't have to try to figure what style the project uses. I run The one caveat are docstrings. I made the mistake of making them 88 chars as well. In Jupyter/IPython, that means that docstrngs are basically unreadable. Black doesn't touch docstrings so it's not a huge problem. |
@GuillaumeFavelier Thank you for your mention. I'm also not a developer, but I'm +1 for black. And ⬆️ is my patch and opinion. And also isort is good to use. Thank you for reading. |
isort is really awesome - I manually use it on PyVista every once in a while as imports do not change that often |
Any news on this one? :) |
Now we use pylint, pycodestyle, flake8, black, mypy, isort in pyvistaqt. |
We probably can close this issue then. Thanks for pointing this out @tkoyama010 |
agreed. I think we've converged on which things to use if we go that route so I will close this issue. It may be a long time before we actually follow through with an autoformatter here though (just such a large codebase to try to do it all at once) |
I'm playing around with Black and it's super easy to integrate into projects with a pre-commit hook.
I'm curious how the active contributors would feel about embracing an automatic code-styler like Black (or another)? This would give us all more consistent formatting of code across the API. It's also designed to produce easier-to-navigate diffs and remove the need for formatting by hand.
It looks like each contributor would have to set up the pre-commit hook I think?
Ping @akaszynski
The text was updated successfully, but these errors were encountered: