Skip to content

Commit df35222

Browse files
committed
Running latest black formatter on all code, however it must not be run on the test input files - the .rc files reference line numbers in the .py files, if the .py files change then the tests all break..
1 parent 59e413d commit df35222

12 files changed

+12
-10
lines changed

.pre-commit-config.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ repos:
2020
rev: 24.4.2
2121
hooks:
2222
- id: black
23-
args: [--safe, --line-length=120, "--exclude=pylint_django/tests/input/"]
23+
# see https://stackoverflow.com/a/61046953
24+
exclude: ^pylint_django/tests/input.*$
25+
args: [--safe, --line-length=120]
2426
- repo: local
2527
hooks:
2628
- id: pylint

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ install:
55

66

77
make test:
8-
tox
8+
tox

pylint_django/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""pylint_django module."""
22

3-
43
from pylint_django import plugin
54

65
register = plugin.register # pylint: disable=invalid-name

pylint_django/__pkginfo__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
"""pkginfo."""
2+
23
BASE_ID = 51

pylint_django/augmentations/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Augmentations."""
2+
23
# pylint: disable=invalid-name
34
import functools
45
import itertools

pylint_django/checkers/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Checkers."""
2+
23
from pylint_django.checkers.auth_user import AuthUserChecker
34
from pylint_django.checkers.django_installed import DjangoInstalledChecker
45
from pylint_django.checkers.foreign_key_strings import ForeignKeyStringsChecker

pylint_django/checkers/forms.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Models."""
2+
23
from astroid.nodes import Assign, AssignName, ClassDef
34
from pylint.checkers import BaseChecker
45

pylint_django/checkers/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Models."""
2+
23
from astroid import Const
34
from astroid.nodes import Assign, AssignName, ClassDef, FunctionDef
45
from pylint.checkers import BaseChecker

pylint_django/plugin.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Common Django module."""
2+
23
# we want to import the transforms to make sure they get added to the astroid manager,
34
# however we don't actually access them directly, so we'll disable the warning
45
from pylint_django import compat

pylint_django/transforms/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
For example, the ForeignKeyStringsChecker loads the foreignkey.py transforms
99
itself as it may be disabled independently of the rest of pylint-django
1010
"""
11+
1112
import os
1213
import re
1314

pylint_django/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utils."""
2+
23
import sys
34

45
import astroid

pyproject.toml

-7
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ include = ["pylint_django/LICENSE"]
3737
exclude = ["**/tests/**", "**/testutils.py", "**/tests.py"]
3838

3939

40-
[project.urls]
41-
"Repository" = "https://github.com/pylint-dev/pylint-djangp"
42-
"Bug Tracker" = "https://github.com/pylint-dev/pylint-djangp/issues"
43-
"Changelog" = "https://github.com/pylint-dev/pylint-django/blob/master/CHANGELOG.rst"
44-
"Contributors" = "https://github.com/pylint-dev/pylint-django/blob/master/CONTRIBUTORS.md"
45-
46-
4740
[tool.poetry.dependencies]
4841
python = ">=3.8,<4.0"
4942
pylint-plugin-utils = ">=0.8"

0 commit comments

Comments
 (0)