Skip to content

sorted imports statements and apply "black" formatting - #583

Merged
alexeagle merged 4 commits into
bazel-contrib:mainfrom
UebelAndre:cleanup
Dec 29, 2021
Merged

sorted imports statements and apply "black" formatting#583
alexeagle merged 4 commits into
bazel-contrib:mainfrom
UebelAndre:cleanup

Conversation

@UebelAndre

@UebelAndre UebelAndre commented Dec 28, 2021

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Does not include precompiled binaries, eg. .par files. See CONTRIBUTING.md for info
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?
This PR is a minor cleanup I've pulled out of another set of changes I'm working on. I noticed in quite a few files that there were some unused import warnings poping up around the code base so I'd fixed those and ran isort to get some "import-exclusive" formatting to reduce as much noise in git history as possible.

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Import statements are unsorted and include unused imports.

Issue Number: N/A

What is the new behavior?

Imports are sorted to try and promote good code hygiene.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@UebelAndre
UebelAndre marked this pull request as ready for review December 28, 2021 02:01
@UebelAndre UebelAndre changed the title sorted imports using isort sorted imports statements Dec 28, 2021
@alexeagle

Copy link
Copy Markdown
Contributor

Please use the .pre-commit-config.yaml to run format on every commit.

Then pre-commit run --all-files will make the first big reformatting change, which we can add to .git-blame-ignore-revs after it lands to avoid polluting the blame layer.

@UebelAndre UebelAndre changed the title sorted imports statements sorted imports statements and apply "black" formatting Dec 29, 2021
@alexeagle

Copy link
Copy Markdown
Contributor

Nice, thanks. Now we're just missing pre-commit.ci to yell at contributors who didn't install the pre-commit hook.

@alexeagle
alexeagle merged commit 5cf439d into bazel-contrib:main Dec 29, 2021
@UebelAndre UebelAndre mentioned this pull request Dec 29, 2021
12 tasks
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.

2 participants