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

Request: run black . to standardize the coding style #31

Open
oesteban opened this issue Nov 14, 2022 · 1 comment
Open

Request: run black . to standardize the coding style #31

oesteban opened this issue Nov 14, 2022 · 1 comment

Comments

@oesteban
Copy link
Contributor

Although not strictly required for the project, the project's maintainability (and reviewing) would be very much improved if it sticks with standardized style agreements.

This would require (1) installing black; and (2) running it and pushing a PR with all the changes.

In general, and if you want to run the extra mile, you could think of installing it as a "pre-commit hook" (https://black.readthedocs.io/en/stable/integrations/source_version_control.html)

@effigies
Copy link

For what it's worth, I've started to adopt the practice of using pipx for these sorts of utilities.

pip install pipx

It makes it very difficult to accidentally break your tool or use an out-of-date tool.

pipx run black

Will check for the newest version of black, install/upgrade it in its own environment that nothing else can be installed into, and then run it.

pipx run flake8 is also useful as it will catch things like imports that are never used or variables that are used before they are assigned, which will catch most typos.

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

No branches or pull requests

2 participants