Skip to content

Blacken our code #1900

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

Closed
wants to merge 3 commits into from
Closed

Blacken our code #1900

wants to merge 3 commits into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Sep 30, 2019

Checklist
  • npm install && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

Like #1899 but for Python code. Uses the Python Software Foundation's Black https://github.com/psf/black to format all Python code in the canonical way and adds a test to Travis CI to avoid any backsliding.

@rvagg
Copy link
Member

rvagg commented Sep 30, 2019

By doing this, we're basically making it impossible for changes from refack/GYP3 to be pulled over, so we'd need to be sure that we're committing to maintaining GYP here and having the canonical version. I'm fine with applying consistent style linting, it makes contributions much more straightforward, but this is a big step, so let's let this linger and see what others have to say.

@cclauss
Copy link
Contributor Author

cclauss commented Sep 30, 2019

If we blacken both codebases, we will get really clean diffs.

@rvagg
Copy link
Member

rvagg commented Oct 1, 2019

If we blacken both codebases, we will get really clean diffs.

but lose the ability to cherry-pick isolated changes

@cclauss cclauss added the Python label Oct 2, 2019
@cclauss cclauss closed this Oct 27, 2019
@cclauss cclauss deleted the blacken-our-code branch October 27, 2019 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants