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

Use black formatting check #186

Merged
merged 11 commits into from
Jan 13, 2021
Merged

Use black formatting check #186

merged 11 commits into from
Jan 13, 2021

Conversation

cehbrecht
Copy link
Member

Overview

This PR fixes adds black formatting.

Changes:

  • Added black.
  • Added pre-commit.
  • Updated dev guide.
  • Updated setup.cfg and setup.py.

Related Issue / Discussion

Additional Information

Links to other issues or sources.

@cehbrecht cehbrecht requested a review from Zeitsperre January 13, 2021 16:32
@cehbrecht cehbrecht self-assigned this Jan 13, 2021
assert (
utils.delist(
[
"one",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"one",
"one"

Then re-run pre-commit run --all-files

[
"application/gml+xml",
"application/zip",
"application/x-zipped-shp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"application/x-zipped-shp",
"application/x-zipped-shp"

"LSJ_LL.zip",
[
"application/gml+xml",
"application/x-zipped-shp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"application/x-zipped-shp",
"application/x-zipped-shp"

run: make lint
if: matrix.python-version == 3.8
- name: Check formatting with black ⚙️
run: black --check --target-version py38 birdy tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: black --check --target-version py38 birdy tests
run: black --check --target-version py36 birdy tests

I wouldn't put the conventions up to py38 if we are supporting building on platforms starting at py36. Could potentially introduce new features not supported in python<3.8.

hooks:
- id: black
language_version: python3
args: ["--target-version", "py38"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
args: ["--target-version", "py38"]
args: ["--target-version", "py36"]

@cehbrecht cehbrecht merged commit b0c8fa8 into master Jan 13, 2021
@cehbrecht cehbrecht deleted the use-black branch January 13, 2021 17:09
@cehbrecht cehbrecht mentioned this pull request Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants