diff --git a/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py b/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py index 043126b0..b625de59 100644 --- a/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py +++ b/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py @@ -2,7 +2,6 @@ Checks that Pylint does not complain Postgres model fields. """ # pylint: disable=C0111,W5101 -from __future__ import print_function from django.contrib.postgres import fields from django.db import models diff --git a/pylint_django/tests/input/func_hard_coded_auth_user.py b/pylint_django/tests/input/func_hard_coded_auth_user.py index 99e3041b..c3c37cf1 100644 --- a/pylint_django/tests/input/func_hard_coded_auth_user.py +++ b/pylint_django/tests/input/func_hard_coded_auth_user.py @@ -1,8 +1,6 @@ # pylint: disable=missing-docstring, wildcard-import, unused-wildcard-import -# flake8: noqa=F401, F403 -from django.contrib.auth.models import * # [imported-auth-user] -from django.contrib.auth.models import User # [imported-auth-user] +from django.contrib.auth.models import * # [imported-auth-user] # noqa: F403 from django.db import models diff --git a/pylint_django/tests/input/func_noerror_form_fields.py b/pylint_django/tests/input/func_noerror_form_fields.py index dada077b..61fd7f84 100644 --- a/pylint_django/tests/input/func_noerror_form_fields.py +++ b/pylint_django/tests/input/func_noerror_form_fields.py @@ -3,7 +3,6 @@ methods on Django form forms. """ # pylint: disable=missing-docstring -from __future__ import print_function from datetime import date, datetime diff --git a/pylint_django/tests/input/func_noerror_model_fields.py b/pylint_django/tests/input/func_noerror_model_fields.py index c0389ff7..b254003b 100644 --- a/pylint_django/tests/input/func_noerror_model_fields.py +++ b/pylint_django/tests/input/func_noerror_model_fields.py @@ -3,7 +3,6 @@ methods on Django model fields. """ # pylint: disable=missing-docstring -from __future__ import print_function from datetime import date, datetime from decimal import Decimal diff --git a/pylint_django/tests/input/func_noerror_protected_meta_access.py b/pylint_django/tests/input/func_noerror_protected_meta_access.py index 96e09adc..3671af58 100644 --- a/pylint_django/tests/input/func_noerror_protected_meta_access.py +++ b/pylint_django/tests/input/func_noerror_protected_meta_access.py @@ -6,7 +6,6 @@ and https://docs.djangoproject.com/en/1.9/ref/models/meta/) """ # pylint: disable=missing-docstring -from __future__ import print_function from django.db import models diff --git a/pylint_django/tests/input/func_noerror_uuid_field.py b/pylint_django/tests/input/func_noerror_uuid_field.py index 0d38dfc9..da5b3c6c 100644 --- a/pylint_django/tests/input/func_noerror_uuid_field.py +++ b/pylint_django/tests/input/func_noerror_uuid_field.py @@ -2,7 +2,6 @@ Checks that Pylint does not complain about UUID fields. """ # pylint: disable=missing-class-docstring,missing-function-docstring -from __future__ import print_function from django.db import models diff --git a/pylint_django/tests/input/migrations/0002_new_column.py b/pylint_django/tests/input/migrations/0002_new_column.py index 07ebc2d6..e3df2ed9 100644 --- a/pylint_django/tests/input/migrations/0002_new_column.py +++ b/pylint_django/tests/input/migrations/0002_new_column.py @@ -9,7 +9,7 @@ > ... adding columns with default values will cause a full rewrite of > the table, for a time proportional to its size. -> For this reason, it’s recommended you always create new columns with +> For this reason, it's recommended you always create new columns with > null=True, as this way they will be added immediately. """ # pylint: disable=missing-docstring, invalid-name diff --git a/pyproject.toml b/pyproject.toml index 41362e51..8a2b63ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,8 @@ max-line-length = 120 [tool.ruff] line-length = 120 + +[tool.ruff.lint] select = [ "E", # pycodestyle "F", # pyflakes diff --git a/tox.ini b/tox.ini index 17594857..22e5f64d 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,6 @@ commands = clean: find . -type d -name __pycache__ -delete clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/ deps = - ruff: ruff pylint: pylint<3 pylint: Django readme: twine @@ -50,3 +49,7 @@ allowlist_externals = py{37,38,39,310,311}-django{22,30,31,32,40,41,42}: bash clean: find clean: rm + +[testenv:ruff] +commands = ruff check +deps = ruff