From b1f1ba62bb37b7b03cf01d71b396a496c04ca813 Mon Sep 17 00:00:00 2001 From: David Wobrock Date: Sun, 30 Nov 2025 13:01:10 +0100 Subject: [PATCH] chore: upgrade dependencies Also remove coverage run, as we don't really use it in this lib anyway. --- .codecov.yml | 4 -- .github/workflows/ci-build.yml | 49 +++---------------- .pre-commit-config.yaml | 17 ++++--- CHANGELOG.md | 1 + pyproject.toml | 3 +- .../migration_linter.py | 6 ++- tox.ini | 8 --- 7 files changed, 22 insertions(+), 66 deletions(-) delete mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 35cde5c..0000000 --- a/.codecov.yml +++ /dev/null @@ -1,4 +0,0 @@ -coverage: - status: - project: off - patch: off diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index dafbf7d..7dab62b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,7 +33,7 @@ jobs: name: Build with Python ${{ matrix.python-version }} steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 # Fetch all tags and branches because tests rely on it with: fetch-depth: 0 @@ -42,7 +42,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: python -m pip install tox==4.6.3 tox-gh-actions + run: python -m pip install tox==4.30.3 tox-gh-actions - name: Test with tox ${{ matrix.python-version }} run: tox @@ -51,51 +51,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v5 - - name: Set up Python 3.12 + uses: actions/checkout@v6 + - name: Set up Python 3.13 uses: actions/setup-python@v6 with: - python-version: '3.12' + python-version: '3.13' - name: Install dependencies - run: python -m pip install tox==4.24.1 + run: python -m pip install tox==4.30.3 - name: Lint with tox run: tox env: TOXENV: lint - - coverage: - name: Generate coverage - runs-on: ubuntu-latest - services: - postgres: - image: postgres - env: - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - mysql: - image: mysql:8.0 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - steps: - - name: Checkout code - uses: actions/checkout@v5 - # Fetch all tags and branches because tests rely on it - with: - fetch-depth: 0 - - name: Set up Python 3.12 - uses: actions/setup-python@v6 - with: - python-version: '3.12' - - name: Install dependencies and coverage - run: python -m pip install tox==4.24.1 - - name: Test with tox with coverage - run: tox - env: - TOXENV: coverage diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da2c006..3ea56da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -14,20 +14,20 @@ repos: - id: forbid-submodules - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 25.1.0 + rev: 25.11.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 7.2.0 + rev: 7.3.0 hooks: - id: flake8 exclude: ^tests/ - repo: https://github.com/pycqa/isort - rev: 6.0.1 + rev: 7.0.0 hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v1.19.0 hooks: - id: mypy additional_dependencies: @@ -36,9 +36,12 @@ repos: - "--ignore-missing-imports" exclude: ^tests/ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.2 + rev: v0.14.7 hooks: - - id: ruff + - id: ruff-check args: - "--line-length=88" + - "--fix" + exclude: ^tests/ + - id: ruff-format exclude: ^tests/ diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c7370..71f6ba5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Miscellaneous: - Add py.typed file (#303) - Add support for Django 5.2 (#304) - Add support for Python 3.14 +- Remove coverage from CI ## 5.2.0 diff --git a/pyproject.toml b/pyproject.toml index 8029681..6bcfc0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,11 +58,10 @@ django_migration_linter = ['py.typed'] [project.optional-dependencies] test = [ - "tox>=4.6.3", + "tox>=4.30.3", "mysqlclient>=2.1.1", "psycopg2>=2.9.6", "django_add_default_value>=0.4.0", - "coverage>=7.2.7", ] [tool.isort] diff --git a/src/django_migration_linter/migration_linter.py b/src/django_migration_linter/migration_linter.py index 64c0849..50aae47 100644 --- a/src/django_migration_linter/migration_linter.py +++ b/src/django_migration_linter/migration_linter.py @@ -415,7 +415,8 @@ class MigrationLinter: migrations = [] for line in map( - clean_bytes_to_str, diff_process.stdout.readlines() # type: ignore + clean_bytes_to_str, + diff_process.stdout.readlines(), # type: ignore ): # Only gather lines that include added migrations. if self.is_migration_file(line): @@ -455,7 +456,8 @@ class MigrationLinter: if diff_process.returncode != 0: output = [] for line in map( - clean_bytes_to_str, diff_process.stderr.readlines() # type: ignore + clean_bytes_to_str, + diff_process.stderr.readlines(), # type: ignore ): output.append(line) logger.error("Error while git diff command:\n{}".format("".join(output))) diff --git a/tox.ini b/tox.ini index 732c205..eed86f0 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,6 @@ envlist = py{310,311,312,313}-django51 py{310,311,312,313,314}-django52 lint - coverage [gh-actions] python = @@ -39,13 +38,6 @@ basepython = python3.12 deps = pre-commit commands = pre-commit run --all-files --show-diff-on-failure -[testenv:coverage] -commands = - coverage run manage.py test --no-input {posargs} - coverage xml -i -extras = test -pip_pre = true - [flake8] max-line-length=88 ignore=E203,W503