diff --git a/.devcontainer/Python 3.11/devcontainer.json b/.devcontainer/Python 3.11/devcontainer.json index 154e481d..a09f809f 100644 --- a/.devcontainer/Python 3.11/devcontainer.json +++ b/.devcontainer/Python 3.11/devcontainer.json @@ -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" ] } } diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c8044309..5f346700 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff4759d7..5a49c9d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 894e9d73..5cd503c3 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ - "ms-vscode-remote.remote-containers" + "ms-vscode-remote.remote-containers", + "ms-python.black-formatter" ] } diff --git a/requirements-dev.txt b/requirements-dev.txt index 9d9e27c2..889770b2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -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