From d79ba8bbeb5636c3300f715095f3e7eba0f8dfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 15 Dec 2023 10:44:13 +0100 Subject: [PATCH] Sync with WeblateOrg/meta --- .github/renovate.json | 12 ++++++++++++ .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/pre-commit.yml | 11 ++++++++--- .github/workflows/setup.yml | 4 ++-- .pre-commit-config.yaml | 5 +---- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index ee6feba..f434968 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -45,6 +45,18 @@ "shellcheck-py/shellcheck-py" ], "versioning": "loose" + }, + { + "matchPackageNames": [ + "python" + ], + "matchDatasources": [ + "docker" + ], + "separateMinorPatch": true, + "minor": { + "dependencyDashboardApproval": true + } } ], "regexManagers": [ diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a03f7ce..c62c255 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.11' - run: pip install setuptools - run: python setup.py build diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 885ff4d..b9d8c24 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -27,14 +27,19 @@ jobs: path: | ~/.cache/pip ~/.cache/pre-commit - key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }} + key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('pyproject.toml') }} - name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.11' + - name: Update pip + run: python -m pip install --upgrade pip wheel - name: Install dependencies run: | - python -m pip install --upgrade pip wheel - pip install -r requirements-lint.txt + if [ -f requirements-lint.txt ] ; then + pip install -r requirements-lint.txt + else + pip install -e .[lint] + fi - name: pre-commit run: pre-commit run --all diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 3388ad1..0c53927 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -53,7 +53,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: '3.11' cache: pip cache-dependency-path: requirements*.txt - name: Install dependencies @@ -74,7 +74,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: '3.11' cache: pip cache-dependency-path: requirements*.txt - name: Install dependencies diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4cb8e8..9667e20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,15 +16,12 @@ repos: args: [--fix=lf] - id: pretty-format-json args: [--no-sort-keys, --autofix, --no-ensure-ascii] -- repo: https://github.com/psf/black - rev: 23.12.0 - hooks: - - id: black - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.8 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format - repo: https://github.com/asottile/blacken-docs rev: 1.16.0 hooks: