-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Use black
for autoformatting
#53
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
Conversation
thanks for the PR. 2 things:
but nevertheless, thanks for contributing! |
if we do bring this in, let's use single quotes not double quotes. @alok also, please resolve the conflicts first. |
Yeah normally I'd discuss first but this was a really quick PR since I've set it up for other projects before. Black is a stricter subset of pep 8 that's meant to make reading diffs as easy as possible. It's not the prettiest style, but like gofmt, is meant to eliminate pointless style debates. The tool doesn't use single quotes on purpose and it has some reasoning on its readme, but FWIW you can use any quote style you want and it'll change it at the end. |
If you look at it and decide you want it, let me know and I'll rebase. |
you can run black with the parameter |
@alok thanks for this but we're going to pass at the moment. In the future get a verbal ok from me so we both agree on a new feature. We're done adding formatting and engineering "best practices" to the package. @Borda has already added the last few missing pieces for better test coverage and package stability. From here forward let's focus on feature or speed improvements in the package. |
In CONTRIBUTING.md, you say to lint the code with It would be nice to agree on one so it's easy to format the code the same way for everyone when contributing to the project. I also found I save time when developing using such a tool. I personally like (I can also open a new issue if needed) |
We have been using |
https://medium.com/3yourmind/auto-formatters-for-python-8925065f9505 |
black
has become popular enough forPython formatting that it was officially adopted by the PSF, and is
being used to format the standard library. I like it because it makes
code that's very consistent to read, which makes development ever so
slightly easier for everyone.
In case this PR is desired but the actual formatting changes interfere
with other current branches, I can rebase to leave out the actual
formatting for now.