Skip to content

Commit

Permalink
pins pre-commit-tool versions
Browse files Browse the repository at this point in the history
I've run precommit-autoupdate to update black to a current version with an explicit version number. See this issue for reference psf/black#420 (comment)
This allows us to pin the github-actions tool versions as well.

This commit applies the new formatting style directly.
  • Loading branch information
bockstaller committed Nov 12, 2020
1 parent 49a783f commit 270eb49
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/development_workflow.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: psf/black@stable
- uses: psf/black@20.8b1

flake8:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .isort.cfg
@@ -1,2 +1,3 @@
[settings]
line_length=88
line_length=88
known_third_party = utils
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
@@ -1,17 +1,18 @@
# isort
repos:
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
rev: v2.2.0
hooks:
- id: seed-isort-config

- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
rev: v5.6.4
hooks:
- id: isort

# black
- repo: https://github.com/ambv/black
rev: stable
rev: 20.8b1
hooks:
- id: black
args:
Expand All @@ -33,7 +34,7 @@

# flake8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
rev: 3.8.4
hooks:
- id: flake8
args:
Expand Down
3 changes: 2 additions & 1 deletion src/main.py
Expand Up @@ -13,7 +13,8 @@
# run example function
hello_world_success = hello_world()
print("Hello World completed successfully!") if hello_world_success else print(
"Hello Wold failed!")
"Hello Wold failed!"
)

# exemplify how to access environment variables
print("\nEnvironment variable: {}".format(os.environ["TEST_PW"]))
Expand Down
2 changes: 1 addition & 1 deletion tests/sample_test.py
Expand Up @@ -12,5 +12,5 @@ def test_sample(self):
self.assertTrue(True)


if __name__ == '__main__':
if __name__ == "__main__":
unittest.main()

0 comments on commit 270eb49

Please sign in to comment.