Merge pull request #875 from oddstr13/pr-black-2

Add black to CI, pre-commit and devcontainer
This commit is contained in:
Odd Stråbø 2024-06-10 13:12:48 +02:00 committed by GitHub
commit 6413f441ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 7 deletions

View file

@ -23,7 +23,8 @@
"GitHub.vscode-pull-request-github", "GitHub.vscode-pull-request-github",
"hbenl.vscode-test-explorer", "hbenl.vscode-test-explorer",
"redhat.vscode-xml", "redhat.vscode-xml",
"ninoseki.vscode-pylens" "ninoseki.vscode-pylens",
"ms-python.black-formatter"
] ]
} }
} }

View file

@ -64,3 +64,9 @@ jobs:
flake8.output flake8.output
test.xml test.xml
coverage.xml coverage.xml
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable

View file

@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0 rev: v4.6.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: check-yaml - id: check-yaml
@ -15,10 +15,10 @@ repos:
# - id: editorconfig-checker # - id: editorconfig-checker
# exclude: '^LICENSE\.txt$' # exclude: '^LICENSE\.txt$'
# - repo: https://github.com/psf/black - repo: https://github.com/psf/black
# rev: "24.4.2" rev: "24.4.2"
# hooks: hooks:
# - id: black - id: black
# - repo: https://github.com/pycqa/flake8 # - repo: https://github.com/pycqa/flake8
# rev: 7.0.0 # rev: 7.0.0

View file

@ -1,5 +1,6 @@
{ {
"recommendations": [ "recommendations": [
"ms-vscode-remote.remote-containers" "ms-vscode-remote.remote-containers",
"ms-python.black-formatter"
] ]
} }

View file

@ -12,6 +12,7 @@ Kodistubs ~=21.0
git+https://github.com/romanvm/kodi.six git+https://github.com/romanvm/kodi.six
git+https://github.com/ruuk/script.module.addon.signals git+https://github.com/ruuk/script.module.addon.signals
pre-commit >= 3.7.1
pytest >= 4.6.11 pytest >= 4.6.11
coverage >= 5.2 coverage >= 5.2
flake8 >= 3.8 flake8 >= 3.8