From ad0a537150427a885dd2bc1ef9b1069a33161080 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 15 Apr 2024 17:06:08 +0300 Subject: [PATCH] Upgrade lint and CI tools --- .github/workflows/ci.yml | 10 +++++----- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 12 +++++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25071a68..c266434e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pre-commit/action@v3.0.0 + - uses: pre-commit/action@v3.0.1 env: RUFF_OUTPUT_FORMAT: github test: @@ -40,7 +40,7 @@ jobs: BABEL_CLDR_QUIET: "1" steps: - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: cldr key: cldr-${{ hashFiles('scripts/*cldr*') }} @@ -60,7 +60,7 @@ jobs: env: COVERAGE_XML_PATH: ${{ runner.temp }} BABEL_TOX_EXTRA_DEPS: pytest-github-actions-annotate-failures - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: directory: ${{ runner.temp }} build: @@ -76,7 +76,7 @@ jobs: - run: pip install build -e . - run: make import-cldr - run: python -m build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: dist path: dist @@ -91,7 +91,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: dist path: dist/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c6554a5..f6c3d706 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.291 + rev: v0.3.7 hooks: - id: ruff args: - --fix - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-docstring-first diff --git a/pyproject.toml b/pyproject.toml index 5621c2eb..83b41c29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,11 @@ [tool.ruff] target-version = "py38" -select = [ +extend-exclude = [ + "tests/messages/data", +] + +[tool.ruff.lint] +extend-select = [ "B", "C", "COM", @@ -17,8 +22,5 @@ ignore = [ "E741", # Ambiguous variable name "UP012", # "utf-8" is on purpose ] -extend-exclude = [ - "tests/messages/data", -] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "scripts/import_cldr.py" = ["E402"] -- 2.47.2