From 954f9a17ca3de41aa1d27e6b2743509c063ed12a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 21:09:36 +0000 Subject: [PATCH 1/7] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.13.0 → v0.14.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.0...v0.14.2) - [github.com/tox-dev/pyproject-fmt: v2.6.0 → v2.11.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.6.0...v2.11.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4454a8..a17b056 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: args: [--fix=lf] - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.13.0" + rev: "v0.14.2" hooks: - id: ruff args: ["--fix"] @@ -20,7 +20,7 @@ repos: exclude: ^pylint_django/tests/input.*$ args: [--line-length=120] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "v2.6.0" + rev: "v2.11.0" hooks: - id: pyproject-fmt # https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version From 9fe2f33c71542f874290b943531e1b364c144953 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 24 Oct 2025 08:13:52 +0200 Subject: [PATCH 2/7] [ruff] Upgrade the legacy alias in pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a17b056..fbc6518 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.14.2" hooks: - - id: ruff + - id: ruff-check args: ["--fix"] exclude: "tests/input/" - id: ruff-format From 9c93eaa68b1b16c38927323e22cce856a410662f Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 24 Oct 2025 08:20:05 +0200 Subject: [PATCH 3/7] [pre-commit] Disable new pre-commit issues --- pylint_django/compat.py | 2 +- pylint_django/tests/input/external_factory_boy_noerror.py | 2 +- pyproject.toml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pylint_django/compat.py b/pylint_django/compat.py index 9eeb128..ba77e4f 100644 --- a/pylint_django/compat.py +++ b/pylint_django/compat.py @@ -1,4 +1,4 @@ -# flake8: noqa +# flake8: noqa: F401 # pylint: skip-file # no sane linter can figure out the hackiness in this compatibility layer... import sys diff --git a/pylint_django/tests/input/external_factory_boy_noerror.py b/pylint_django/tests/input/external_factory_boy_noerror.py index 9f6152d..8118055 100644 --- a/pylint_django/tests/input/external_factory_boy_noerror.py +++ b/pylint_django/tests/input/external_factory_boy_noerror.py @@ -36,7 +36,7 @@ class Meta: class BookTestCase(test.LiveServerTestCase): serialized_rollback = True - def _fixture_setup(self): + def _fixture_setup(self): # pylint: disable=arguments-differ super()._fixture_setup() self.book = BookFactory() _author = AuthorFactory() diff --git a/pyproject.toml b/pyproject.toml index a98e802..39a7de6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,7 @@ lint.select = [ "W", # pycodestyle ] lint.ignore = [ + "PLC0415", # `import` should be at the top-level of a file "PLR0912", # Too many branches, worse than C901 "PLR0915", # Too many statements, worse than C901 "PLR2004", # Magic value used in comparison, opinionated From 09054591e0bd31e3070ae8dbdfe68064d8855e19 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 24 Oct 2025 08:29:22 +0200 Subject: [PATCH 4/7] Explicitely support only the last minor --- .github/workflows/build.yml | 6 +++--- pyproject.toml | 11 ++--------- tox.ini | 17 ++++++----------- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2b3e76..9aa45f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12"] - django-version: ["5.0", "5.1", "-main"] + django-version: ["5.2", "-main"] steps: - uses: actions/checkout@v4 @@ -76,7 +76,7 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] - django-version: ["4.0", "4.1", "4.2"] + django-version: ["4.2"] steps: - uses: actions/checkout@v4 @@ -104,7 +104,7 @@ jobs: fail-fast: false matrix: python-version: [3.9] - django-version: [3.2, 3.1, "3.0", "2.2"] + django-version: ["2.2", "3.2"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 39a7de6..ed6d741 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = [ "poetry-core>=1" ] [tool.poetry] name = "pylint-django" -version = "2.6.1" +version = "2.7.0" readme = "README.rst" description = "A Pylint plugin to help Pylint understand the Django web framework" repository = "https://github.com/pylint-dev/pylint-django" @@ -22,16 +22,9 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Framework :: Django :: 2.2", - "Framework :: Django :: 3", - "Framework :: Django :: 3.0", - "Framework :: Django :: 3.1", "Framework :: Django :: 3.2", - "Framework :: Django :: 4", - "Framework :: Django :: 4.0", - "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", - "Framework :: Django :: 5.0", - "Framework :: Django :: 5.1", + "Framework :: Django :: 5.2", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", ] keywords = [ "pylint", "django", "plugin" ] diff --git a/tox.ini b/tox.ini index c27b6b7..9ed0ea4 100644 --- a/tox.ini +++ b/tox.ini @@ -7,9 +7,9 @@ envlist = flake8 pylint readme - py{39}-django{22,30,31,32} - py{39,310,311,312}-django{40,41,42} - py{310,311,312}-django{50,51,-main} + py{39}-django{22,32} + py{39,310,311,312}-django{42} + py{310,311,312}-django{52-main} requires = pip >=21.0.1 @@ -21,7 +21,7 @@ commands = django_not_installed: bash pylint_django/tests/test_django_not_installed.sh pylint: pylint pylint_django readme: bash -c "poetry build && twine check dist/*" - py{38,39,310,311,312}-django{22,30,31,32,40,41,42,50}: bash scripts/test.sh --cov=pylint_django + py{38,39,310,311,312}-django{22,32,42,52}: bash scripts/test.sh --cov=pylint_django clean: find . -type f -name '*.pyc' -delete clean: find . -type d -name __pycache__ -delete clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/ @@ -32,14 +32,9 @@ deps = readme: twine readme: wheel django22: Django>=2.2,<3.0 - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 - django41: Django>=4.1,<4.2 django42: Django>=4.2,<4.3 - django50: Django>=5.0,<5.1 - django51: Django>=5.1,<5.2 + django55: Django>=5.2,<5.3 django-main: Django django-main: git+https://github.com/pylint-dev/astroid@main django-main: git+https://github.com/pylint-dev/pylint@main @@ -49,6 +44,6 @@ setenv = allowlist_externals = django_not_installed: bash readme: bash - django{22,30,31,32,40,41,42,50,51,-main}: bash + django{22,32,42,52,-main}: bash clean: find clean: rm From 735016794e896d1b3d7770200ded75f5c9065e06 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 24 Oct 2025 08:30:53 +0200 Subject: [PATCH 5/7] Add support for python 3.13 in the github workflow --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9aa45f1..358f43f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.12"] + python-version: ["3.13"] toxenv: [django_not_installed, ruff, pylint, readme] steps: @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13"] django-version: ["5.2", "-main"] steps: @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] django-version: ["4.2"] steps: @@ -127,7 +127,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12"] + python-version: ["3.13"] steps: - uses: actions/checkout@v4 From c98a46f36b78d03b1e57b318114a4cee65f5d817 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 24 Oct 2025 08:30:53 +0200 Subject: [PATCH 6/7] Test support for python 3.13 in tox --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 9ed0ea4..b1d1a3d 100644 --- a/tox.ini +++ b/tox.ini @@ -8,8 +8,8 @@ envlist = pylint readme py{39}-django{22,32} - py{39,310,311,312}-django{42} - py{310,311,312}-django{52-main} + py{39,310,311,312,313}-django{42} + py{310,311,312,313}-django{52-main} requires = pip >=21.0.1 @@ -21,7 +21,7 @@ commands = django_not_installed: bash pylint_django/tests/test_django_not_installed.sh pylint: pylint pylint_django readme: bash -c "poetry build && twine check dist/*" - py{38,39,310,311,312}-django{22,32,42,52}: bash scripts/test.sh --cov=pylint_django + py{38,39,310,311,312,313}-django{22,32,42,52}: bash scripts/test.sh --cov=pylint_django clean: find . -type f -name '*.pyc' -delete clean: find . -type d -name __pycache__ -delete clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/ From 2c805e39f87d5640252c3bc9ad2c75f2c2f151d2 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 13 Oct 2025 15:20:33 +0200 Subject: [PATCH 7/7] Bump pylint-django version to 2.7.0 for pylint 4 --- .github/workflows/build.yml | 4 ++-- pyproject.toml | 2 +- tox.ini | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 358f43f..22d8349 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] django-version: ["5.2", "-main"] steps: @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] django-version: ["4.2"] steps: diff --git a/pyproject.toml b/pyproject.toml index ed6d741..cdcdac0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ exclude = [ "**/tests/**", "**/testutils.py", "**/tests.py" ] [tool.poetry.dependencies] python = ">=3.9,<4.0" pylint-plugin-utils = ">=0.8" -pylint = ">=3.0,<4" +pylint = ">=3.0,<5" Django = { version = ">=2.2", optional = true } [tool.poetry.group.dev.dependencies] diff --git a/tox.ini b/tox.ini index b1d1a3d..33c5148 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ envlist = readme py{39}-django{22,32} py{39,310,311,312,313}-django{42} - py{310,311,312,313}-django{52-main} + py{310,311,312,313,314}-django{52-main} requires = pip >=21.0.1 @@ -21,7 +21,7 @@ commands = django_not_installed: bash pylint_django/tests/test_django_not_installed.sh pylint: pylint pylint_django readme: bash -c "poetry build && twine check dist/*" - py{38,39,310,311,312,313}-django{22,32,42,52}: bash scripts/test.sh --cov=pylint_django + py{38,39,310,311,312,313,314}-django{22,32,42,52}: bash scripts/test.sh --cov=pylint_django clean: find . -type f -name '*.pyc' -delete clean: find . -type d -name __pycache__ -delete clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/