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

Add script / instructions for running the code formatter locally #13

Open
bergercookie opened this issue Nov 9, 2020 · 2 comments
Open

Comments

@bergercookie
Copy link
Contributor

bergercookie commented Nov 9, 2020

Currently each developer has to setup flake8 on their own and look into the test_flake8.py for what rules should be ignored and what files to run it on.

Unrelated to this but, @dirk-thomas what's your opinion about switching to black or leave it up to each extension to decide the formatter/linter of choice?

I've used black consistently, it has excellent editors support and I haven't seen any notable bug when using it. It can be used both as a linter or as a formatter, and we can also lose the test_flake8.py file as well.

@bergercookie bergercookie changed the title Add script / instructions for running the flake8 formatter locally Add script / instructions for running the code formatter locally Nov 9, 2020
@dirk-thomas
Copy link
Member

Since each package already decides it's own tests this package can use whatever it prefers. I don't see a strong reason to change what is used for other packages though.

@bergercookie
Copy link
Contributor Author

@lelongg , what do you think of using black in this repo?

There might be a first PR that changes multiple lines to adhere to black, (e.g., changing single quotes to double, which is also reported as a warning by flake) but after that, maintaining it and checking for errors both for developers and in CI will be simplified significantly IMO.

I can make a first pass + PR to show you how that would look..

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

No branches or pull requests

2 participants