Skip to content
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

Run Black code formatter #323

Closed
wants to merge 2 commits into from
Closed

Run Black code formatter #323

wants to merge 2 commits into from

Conversation

theocharides
Copy link

@theocharides theocharides commented Jul 27, 2023

This PR applies Black since it's an improvement on pep8, which required manual enforcement of style guides. The only configurable element in Black is line length. The default is 88 characters which actually seems pretty reasonable, so I maintained the default. Otherwise, I think we should use Black as intended to enforce whatever rules they use to standardize our code. I will make sure the instructions on how to install and run Black end up in our repo docs (it's very simple).

Black doesn't apply line length limitations to code comments and has said that they won't: psf/black#1713, so unfortunately this needs to be done manually. Black also doesn't support Python 2 code, so did not run on some files. None of these were model scripts though and should all be getting cleaned out of the repo.


@theocharides
Copy link
Author

This was a useful test. I will handle it in the Clean Outdate Code PR because we should remove pep8 at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant