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

Format python code with Black 19.10b0 #22

Merged
merged 1 commit into from Mar 15, 2020

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Feb 15, 2020

This reformats the code using black, making no manual changes. We use this in
formatting NixOS module python code, and it keeps the code looking reasonably
good with little/no effort required from maintainers or code reviewers.

This diff can be reproduced from scratch by checking out master and re-running black.

This reformats the code using black, making no manual changes. We use this in
formatting NixOS module python code, and it keeps the code looking reasonable
good with little/no effort required from maintainers or code reviewers.

This diff can be reproduced from scratch by checking out master and re-running black.
@bhipple
Copy link
Contributor Author

bhipple commented Mar 15, 2020

Rebased onto origin/master and re-ran:

$ black .
reformatted /home/bhipple/src/nixops-aws/nixopsaws/resources/iam_role.py
All done! ✨ 🍰 ✨
1 file reformatted, 55 files left unchanged.

As before, there are no manual changes in this PR and the diff can be 100% reproduced from master by re-running black.

@bhipple
Copy link
Contributor Author

bhipple commented Mar 15, 2020

CC @AmineChikhaoui

@AmineChikhaoui AmineChikhaoui merged commit 5efa979 into NixOS:master Mar 15, 2020
bhipple added a commit to bhipple/nixops-aws that referenced this pull request Mar 15, 2020
Having merged the format updates in NixOS#22,
let's add it to pull request validation to ensure we don't backslide.

Note that we could go one step further and add it to the `checkPhase` of the
python package build, like [nixpkgs-review](https://github.com/Mic92/nixpkgs-review/blob/master/default.nix)
does; however, doing so would break the build if someone tried to use the
`nixops-aws` build on 19.09 vs. 20.03 vs. unstable, and since it's a CI/PR only
concept this takes the more gentle approach of just adding it to Travis.
bhipple added a commit to bhipple/nixops-aws that referenced this pull request Mar 15, 2020
Having merged the format updates in NixOS#22,
let's add it to pull request validation to ensure we don't backslide.

Note that we could go one step further and add it to the `checkPhase` of the
python package build, like [nixpkgs-review](https://github.com/Mic92/nixpkgs-review/blob/master/default.nix)
does; however, doing so would break the build if someone tried to use the
`nixops-aws` build on 19.09 vs. 20.03 vs. unstable, and since it's a CI/PR only
concept this takes the more gentle approach of just adding it to Travis.
bhipple added a commit to bhipple/nixops-aws that referenced this pull request Mar 15, 2020
Having merged the format updates in NixOS#22,
let's add it to pull request validation to ensure we don't backslide.

Note that we could go one step further and add it to the `checkPhase` of the
python package build, like [nixpkgs-review](https://github.com/Mic92/nixpkgs-review/blob/master/default.nix)
does; however, doing so would break the build if someone tried to use the
`nixops-aws` build on 19.09 vs. 20.03 vs. unstable, and since it's a CI/PR only
concept this takes the more gentle approach of just adding it to Travis.
@bhipple bhipple deleted the f/format-black branch March 15, 2020 21:32
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.

None yet

4 participants