Skip to content

Commit

Permalink
Merge pull request #875 from oddstr13/pr-black-2
Browse files Browse the repository at this point in the history
Add black to CI, pre-commit and devcontainer
  • Loading branch information
oddstr13 authored Jun 10, 2024
2 parents 94e44d4 + 247571e commit 6413f44
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Python 3.11/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"GitHub.vscode-pull-request-github",
"hbenl.vscode-test-explorer",
"redhat.vscode-xml",
"ninoseki.vscode-pylens"
"ninoseki.vscode-pylens",
"ms-python.black-formatter"
]
}
}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ jobs:
flake8.output
test.xml
coverage.xml
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-yaml
Expand All @@ -15,10 +15,10 @@ repos:
# - id: editorconfig-checker
# exclude: '^LICENSE\.txt$'

# - repo: https://github.com/psf/black
# rev: "24.4.2"
# hooks:
# - id: black
- repo: https://github.com/psf/black
rev: "24.4.2"
hooks:
- id: black

# - repo: https://github.com/pycqa/flake8
# rev: 7.0.0
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"ms-vscode-remote.remote-containers"
"ms-vscode-remote.remote-containers",
"ms-python.black-formatter"
]
}
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Kodistubs ~=21.0
git+https://github.com/romanvm/kodi.six
git+https://github.com/ruuk/script.module.addon.signals

pre-commit >= 3.7.1
pytest >= 4.6.11
coverage >= 5.2
flake8 >= 3.8
Expand Down

0 comments on commit 6413f44

Please sign in to comment.