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
Automatic code formatting #3199
Comments
I think black can be a great choice. the python community is slowly accepting it. |
Leading to this I checked lbry-sdk on lgtm.com seems there are a lot of issues related to Unused Imports etc. |
I hate Regular Python def some_function(arg):
return With def some_function(
arg
):
return I call it "sad style" because of the final sad face that is produced Maybe My preferred style is the one used by scientific libraries like |
Compliance with Python's PEP8 can be checked with flake8.
We may ignore certain errors and warnings.
A good way to test entire folders for compliance is to run the following command.
|
Hi @shyba , |
Hi @shyba, |
We want something like
gofmt
for python. We want to minimize changes to existing code while defining a style we agree to. Ideally it should automatically format files on save (PyCharm integration would be great) and/or as a precommit hook.One option: https://github.com/google/yapf
From @eukreign on Slack:
but to elegantly switch to yapf would require:
whoever takes on this project should be willing to carefully skim through the changes yapf makes to make sure it's not uglier (at least not too much uglier) than before
The text was updated successfully, but these errors were encountered: