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 python auto-formatting tooling #3609
Comments
@jonboiser I was about to open a new issue regarding the Python code style in Kolibri in more general terms but I guess this might be a good opportunity to start the discussion with others. I think it would be great if we could review the current My personal thoughts:
@rtibbles previously suggested that we could use autopep8 to help with automatic reformatting - maybe adding it to the existing pre-commit hook? |
I agree with this, especially if we use autopep8 as a precommit hook, I would suggest that we do this as the first step in the 0.11 backend refactor work. |
@indirectlylit suggests YAPF https://github.com/google/yapf |
updating my recommendation to https://github.com/ambv/black |
In thread below, there is a desire to use something like
To auto-format the python codebase.
Old issue:
is really similar to the docs here:
http://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
And
E41
does not seem to be a pycodestyle code either.E226
(requires whitespace around math operators) andE302
(two newlines between top-level symbols in a module) seem like things that are done the majority of the time and all of the time for me personally. So maybe we should just remove theignore
settingsThe text was updated successfully, but these errors were encountered: