diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2b3e76..22d8349 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,8 +39,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12"] - django-version: ["5.0", "5.1", "-main"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + django-version: ["5.2", "-main"] steps: - uses: actions/checkout@v4 @@ -75,8 +75,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] - django-version: ["4.0", "4.1", "4.2"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + 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 @@ -127,7 +127,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12"] + python-version: ["3.13"] steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4454a8..fbc6518 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,16 +11,16 @@ 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 + - id: ruff-check args: ["--fix"] exclude: "tests/input/" - id: ruff-format 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 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..cdcdac0 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" ] @@ -44,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] @@ -86,6 +79,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 diff --git a/tox.ini b/tox.ini index c27b6b7..33c5148 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,313}-django{42} + 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}-django{22,30,31,32,40,41,42,50}: 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/ @@ -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