chore: upgrade dependencies

Also remove coverage run, as we don't really use it in this lib anyway.
This commit is contained in:
David Wobrock authored and David Wobrock committed 2025-11-30 13:08:40 +01:00
1 parent 9deac1d813
commit b1f1ba62bb
7 files changed
+22 -66

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
coverage:
status:
project: off
patch: off
+6 -43
View File
@@ -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
+10 -7
View File
@@ -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/
+1
View File
@@ -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
+1 -2
View File
@@ -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]
@@ -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)))
-8
View File
@@ -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