Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.0", "5.1", "5.2", "-main"]

steps:
Expand Down Expand Up @@ -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.0", "4.1", "4.2"]

steps:
Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
Changelog
=========


Version 2.7.0
-------------

Other
~~~~~

- Add CI tests against Django 5.2

- CI now tests against python 3.13

Version 2.6.1
-------------
Expand Down
2 changes: 1 addition & 1 deletion pylint_django/augmentations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def is_model_mpttmeta_subclass(node):
return node_is_subclass(node.parent, *parents)


def _attribute_is_magic(node, attrs, parents):
def _attribute_is_magic(node: Attribute, attrs: set[str], parents: tuple[str, ...]) -> bool:
"""Checks that node is an attribute used inside one of allowed parents"""
if node.attrname not in attrs:
return False
Expand Down
4 changes: 3 additions & 1 deletion pylint_django/tests/input/func_noerror_form_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def datefield_tests(self):
print(self.datefield.isoformat())

def decimalfield_tests(self):
print(self.decimalfield.adjusted())
# Known false positive for python 3.13 ?
# (But not bad enough to block the release of python 3.13 support)
print(self.decimalfield.adjusted()) # >3.12:[no-member]

def durationfield_tests(self):
now = datetime.now()
Expand Down
1 change: 1 addition & 0 deletions pylint_django/tests/input/func_noerror_form_fields.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no-member:61:14:61:40:ManyFieldsForm.decimalfield_tests:Instance of 'DecimalField' has no 'adjusted' member:INFERENCE
4 changes: 3 additions & 1 deletion pylint_django/tests/input/func_noerror_model_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def datefield_tests(self):
print(self.datefield.isoformat())

def decimalfield_tests(self):
print(self.decimalfield.compare(Decimal("1.4")))
# Known false positive for python 3.13 ?
# (But not bad enough to block the release of python 3.13 support)
print(self.decimalfield.compare(Decimal("1.4"))) # >3.12:[no-member]

def durationfield_tests(self):
now = datetime.now()
Expand Down
1 change: 1 addition & 0 deletions pylint_django/tests/input/func_noerror_model_fields.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no-member:77:14:77:39:LotsOfFieldsModel.decimalfield_tests:Instance of 'DecimalField' has no 'compare' member:INFERENCE
2 changes: 1 addition & 1 deletion pylint_django/tests/test_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TestDialect(csv.excel):
# specify directly the directory containing test_functional.py
test_functional_dir = os.getenv("PYLINT_TEST_FUNCTIONAL_DIR", "")

# otherwise look for in in ~/pylint/tests - pylint 2.4
# otherwise look for it in ~/pylint/tests - pylint 2.4
# this is the pylint git checkout dir, not the pylint module dir
if not os.path.isdir(test_functional_dir):
test_functional_dir = os.path.join(os.getenv("HOME", "/home/travis"), "pylint", "tests")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3",
"Framework :: Django :: 3.0",
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ envlist =
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,52,-main}
py{39,310,311,312,313}-django{40,41,42}
py{310,311,312,313}-django{50,51,52,-main}

requires =
pip >=21.0.1
Expand All @@ -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,51,52}: bash scripts/test.sh --cov=pylint_django
py{38,39,310,311,312,313}-django{22,30,31,32,40,41,42,50,51,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/
Expand Down
Loading