diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee11c752..05053c9e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,9 @@ repos: rev: 24.4.2 hooks: - id: black - args: [--safe, --line-length=120, "--exclude=pylint_django/tests/input/"] + # see https://stackoverflow.com/a/61046953 + exclude: ^pylint_django/tests/input.*$ + args: [--safe, --line-length=120] - repo: local hooks: - id: pylint diff --git a/Makefile b/Makefile index c5238d5c..fab465f6 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,4 @@ install: make test: - tox \ No newline at end of file + tox diff --git a/pylint_django/__init__.py b/pylint_django/__init__.py index c3028de4..27575371 100644 --- a/pylint_django/__init__.py +++ b/pylint_django/__init__.py @@ -1,6 +1,5 @@ """pylint_django module.""" - from pylint_django import plugin register = plugin.register # pylint: disable=invalid-name diff --git a/pylint_django/__pkginfo__.py b/pylint_django/__pkginfo__.py index a6d71329..ebcf236c 100644 --- a/pylint_django/__pkginfo__.py +++ b/pylint_django/__pkginfo__.py @@ -1,2 +1,3 @@ """pkginfo.""" + BASE_ID = 51 diff --git a/pylint_django/augmentations/__init__.py b/pylint_django/augmentations/__init__.py index 89f454f4..fcb19b35 100644 --- a/pylint_django/augmentations/__init__.py +++ b/pylint_django/augmentations/__init__.py @@ -1,4 +1,5 @@ """Augmentations.""" + # pylint: disable=invalid-name import functools import itertools diff --git a/pylint_django/checkers/__init__.py b/pylint_django/checkers/__init__.py index 1a14b746..c1e12fa9 100644 --- a/pylint_django/checkers/__init__.py +++ b/pylint_django/checkers/__init__.py @@ -1,4 +1,5 @@ """Checkers.""" + from pylint_django.checkers.auth_user import AuthUserChecker from pylint_django.checkers.django_installed import DjangoInstalledChecker from pylint_django.checkers.foreign_key_strings import ForeignKeyStringsChecker diff --git a/pylint_django/checkers/forms.py b/pylint_django/checkers/forms.py index f668684c..dd490de0 100644 --- a/pylint_django/checkers/forms.py +++ b/pylint_django/checkers/forms.py @@ -1,4 +1,5 @@ """Models.""" + from astroid.nodes import Assign, AssignName, ClassDef from pylint.checkers import BaseChecker diff --git a/pylint_django/checkers/models.py b/pylint_django/checkers/models.py index 5bc25c67..ce953506 100644 --- a/pylint_django/checkers/models.py +++ b/pylint_django/checkers/models.py @@ -1,4 +1,5 @@ """Models.""" + from astroid import Const from astroid.nodes import Assign, AssignName, ClassDef, FunctionDef from pylint.checkers import BaseChecker diff --git a/pylint_django/plugin.py b/pylint_django/plugin.py index 254bd0c9..dd4b68e2 100644 --- a/pylint_django/plugin.py +++ b/pylint_django/plugin.py @@ -1,4 +1,5 @@ """Common Django module.""" + # we want to import the transforms to make sure they get added to the astroid manager, # however we don't actually access them directly, so we'll disable the warning from pylint_django import compat diff --git a/pylint_django/transforms/__init__.py b/pylint_django/transforms/__init__.py index 11c56715..e99a6fe2 100644 --- a/pylint_django/transforms/__init__.py +++ b/pylint_django/transforms/__init__.py @@ -8,6 +8,7 @@ For example, the ForeignKeyStringsChecker loads the foreignkey.py transforms itself as it may be disabled independently of the rest of pylint-django """ + import os import re diff --git a/pylint_django/utils.py b/pylint_django/utils.py index 205e3b3f..169e0879 100644 --- a/pylint_django/utils.py +++ b/pylint_django/utils.py @@ -1,4 +1,5 @@ """Utils.""" + import sys import astroid diff --git a/pyproject.toml b/pyproject.toml index b6ffff3d..c3f2c16e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,13 +37,6 @@ include = ["pylint_django/LICENSE"] exclude = ["**/tests/**", "**/testutils.py", "**/tests.py"] -[project.urls] -"Repository" = "https://github.com/pylint-dev/pylint-djangp" -"Bug Tracker" = "https://github.com/pylint-dev/pylint-djangp/issues" -"Changelog" = "https://github.com/pylint-dev/pylint-django/blob/master/CHANGELOG.rst" -"Contributors" = "https://github.com/pylint-dev/pylint-django/blob/master/CONTRIBUTORS.md" - - [tool.poetry.dependencies] python = ">=3.8,<4.0" pylint-plugin-utils = ">=0.8"