Skip to content

Commit

Permalink
chore: Sync with WeblateOrg/meta
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Nov 3, 2024
1 parent 8c674c2 commit 2e73791
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,30 @@ jobs:
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@v3
- name: detect PEP 735
id: pep735
run: |
if grep -q dependency-groups pyproject.toml ; then
echo "found=true" >> $GITHUB_OUTPUT
else
echo "found=false" >> $GITHUB_OUTPUT
fi
- name: pre-commit
if: ${{ steps.pep735.outputs.found }}
run: uv run --only-group pre-commit pre-commit run --all
env:
RUFF_OUTPUT_FORMAT: github
REUSE_OUTPUT_FORMAT: github
- name: Install dependencies
if: ${{ ! steps.pep735.outputs.found }}
run: |
if [ -f requirements-lint.txt ] ; then
uv pip install --system -r requirements-lint.txt
elif grep -q dependency-groups pyproject.toml ; then
uv sync --only-group pre-commit
else
uv pip install --system $(sed -n 's/.*"\(pre-commit==\([^"]*\)\)".*/\1/p' pyproject.toml)
fi
- name: pre-commit
if: ${{ ! steps.pep735.outputs.found }}
run: pre-commit run --all
env:
RUFF_OUTPUT_FORMAT: github
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm==0.3.7
- mdformat-gfm==0.3.6
- mdformat-ruff==0.1.3
- mdformat-shfmt==0.2.0
- mdformat-shfmt==0.1.0
- mdformat_tables==1.0.0

0 comments on commit 2e73791

Please sign in to comment.