diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000..636f30a --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,29 @@ +name: Auto-fix +on: + push: + pull_request: +jobs: + style: + runs-on: ubuntu-latest + steps: + - name: Download source + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install Hatch + run: | + pip install hatch + - name: Install dependencies + run: | + hatch run style:pip freeze + - name: Fix code style + run: | + hatch run style:fix --fix-only + - name: Check if any edits are necessary + run: | + git diff --color --exit-code + - name: Apply automatic fixes using pre-commit-ci-lite + if: failure() && github.event_name == 'pull_request' + uses: pre-commit-ci/lite-action@v1.0.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92dc81f..297562c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,9 +23,9 @@ jobs: os: ubuntu-latest - python: '3.9' os: macos-latest - - python: '3.8' + - python: '3.9' os: windows-latest - - python: '3.8' + - python: '3.9' os: ubuntu-latest versions: minimal runs-on: ${{matrix.os}} @@ -33,7 +33,7 @@ jobs: - name: Download source uses: actions/checkout@v4 - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python}} - name: Pin to lowest versions @@ -55,7 +55,7 @@ jobs: - name: Download source uses: actions/checkout@v4 - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install Hatch @@ -68,11 +68,7 @@ jobs: - name: Check style if: always() run: | - hatch run style:fix - - name: Check formatting - if: always() - run: | - git diff --color --exit-code + hatch run style:check - name: Check types if: always() run: | diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index 3446498..44fed5b 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install dependencies diff --git a/.tools/copier-answers.yml b/.tools/copier-answers.yml index 89e62aa..9d58bd5 100644 --- a/.tools/copier-answers.yml +++ b/.tools/copier-answers.yml @@ -1,4 +1,4 @@ -_commit: 8ebfc313a +_commit: 0903da199 _src_path: gh:oprypin/py-project-template copyright_date: '2019' mkdocs: false diff --git a/mkdocs_redirects/__init__.py b/mkdocs_redirects/__init__.py index a955fda..bc86c94 100644 --- a/mkdocs_redirects/__init__.py +++ b/mkdocs_redirects/__init__.py @@ -1 +1 @@ -__version__ = "1.2.1" +__version__ = "1.2.2" diff --git a/mkdocs_redirects/plugin.py b/mkdocs_redirects/plugin.py index 5c71f9a..d4b58cd 100644 --- a/mkdocs_redirects/plugin.py +++ b/mkdocs_redirects/plugin.py @@ -21,12 +21,11 @@