Skip to content

Commit 188cfb3

Browse files
Add pyproject-fmt
1 parent 52fc41d commit 188cfb3

File tree

2 files changed

+74
-53
lines changed

2 files changed

+74
-53
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ repos:
2626
hooks:
2727
- id: prettier
2828
args: [--prose-wrap=always, --print-width=88]
29+
- repo: https://github.com/tox-dev/pyproject-fmt
30+
rev: "2.1.3"
31+
hooks:
32+
- id: pyproject-fmt
2933
- repo: local
3034
hooks:
3135
- id: pylint

pyproject.toml

Lines changed: 70 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,66 @@
1+
[build-system]
2+
build-backend = "poetry.core.masonry.api"
3+
4+
requires = [
5+
"poetry-core>=1",
6+
]
7+
18
[tool.poetry]
29
name = "pylint-django"
310
version = "2.5.5"
411
readme = "README.rst"
512
description = "A Pylint plugin to help Pylint understand the Django web framework"
613
repository = "https://github.com/PyCQA/pylint-django"
7-
authors = ["Carl Crowder <[email protected]>"]
8-
classifiers=[
9-
"Development Status :: 5 - Production/Stable",
10-
"Environment :: Console",
11-
"Intended Audience :: Developers",
12-
"Operating System :: Unix",
13-
"Topic :: Software Development :: Quality Assurance",
14-
"Programming Language :: Python :: 3",
15-
"Programming Language :: Python :: 3.7",
16-
"Programming Language :: Python :: 3.8",
17-
"Programming Language :: Python :: 3.9",
18-
"Programming Language :: Python :: 3.10",
19-
"Programming Language :: Python :: 3.11",
20-
"Framework :: Django :: 2.2",
21-
"Framework :: Django :: 3",
22-
"Framework :: Django :: 3.0",
23-
"Framework :: Django :: 3.1",
24-
"Framework :: Django :: 3.2",
25-
"Framework :: Django :: 4",
26-
"Framework :: Django :: 4.0",
27-
"Framework :: Django :: 4.1",
28-
"Framework :: Django :: 4.2",
29-
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
14+
authors = [
15+
"Carl Crowder <[email protected]>",
16+
]
17+
classifiers = [
18+
"Development Status :: 5 - Production/Stable",
19+
"Environment :: Console",
20+
"Intended Audience :: Developers",
21+
"Operating System :: Unix",
22+
"Topic :: Software Development :: Quality Assurance",
23+
"Programming Language :: Python :: 3",
24+
"Programming Language :: Python :: 3.7",
25+
"Programming Language :: Python :: 3.8",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Framework :: Django :: 2.2",
30+
"Framework :: Django :: 3",
31+
"Framework :: Django :: 3.0",
32+
"Framework :: Django :: 3.1",
33+
"Framework :: Django :: 3.2",
34+
"Framework :: Django :: 4",
35+
"Framework :: Django :: 4.0",
36+
"Framework :: Django :: 4.1",
37+
"Framework :: Django :: 4.2",
38+
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
39+
]
40+
keywords = [
41+
"pylint",
42+
"django",
43+
"plugin",
3044
]
31-
keywords=["pylint", "django", "plugin"]
3245
packages = [
33-
{ include = "pylint_django/"}
46+
{ include = "pylint_django/" },
3447
]
3548
include = [
3649
"LICENSE",
3750
"*.rst",
38-
"*.md"
51+
"*.md",
52+
]
53+
exclude = [
54+
"**/tests/**",
55+
"**/testutils.py",
56+
"**/tests.py",
3957
]
40-
exclude = ["**/tests/**", "**/testutils.py", "**/tests.py"]
4158

4259
[tool.poetry.dependencies]
4360
python = ">=3.7,<4.0"
4461
pylint-plugin-utils = ">=0.8"
4562
pylint = ">=2.0,<4"
46-
Django = {version=">=2.2", optional = true}
63+
Django = { version = ">=2.2", optional = true }
4764

4865
[tool.poetry.group.dev.dependencies]
4966
tox = "^4.5.1"
@@ -58,15 +75,28 @@ factory-boy = "^3.3.0"
5875
django-tastypie = "^0.14.6"
5976

6077
[tool.poetry.extras]
61-
with_django = ["Django"]
62-
63-
[build-system]
64-
requires = ["poetry-core>=1.0.0"]
65-
build-backend = "poetry.core.masonry.api"
78+
with_django = [
79+
"Django",
80+
]
6681

6782
[tool.black]
6883
line-length = 120
6984

85+
[tool.ruff]
86+
line-length = 120
87+
select = [
88+
"E", # pycodestyle
89+
"F", # pyflakes
90+
"W", # pycodestyle
91+
"B", # bugbear
92+
"I", # isort
93+
"RUF", # ruff
94+
"UP", # pyupgrade
95+
]
96+
ignore = [
97+
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
98+
]
99+
70100
[tool.isort]
71101
multi_line_output = 3
72102
include_trailing_comma = true
@@ -76,25 +106,12 @@ line_length = 120
76106

77107
[tool.pylint.main]
78108
disable = [
79-
"missing-docstring",
80-
"too-many-branches", "too-many-return-statements", "too-many-ancestors",
81-
"too-few-public-methods",
82-
"fixme",
109+
"missing-docstring",
110+
"too-many-branches",
111+
"too-many-return-statements",
112+
"too-many-ancestors",
113+
"too-few-public-methods",
114+
"fixme",
83115
]
84-
ignore="tests"
116+
ignore = "tests"
85117
max-line-length = 120
86-
87-
[tool.ruff]
88-
line-length = 120
89-
select = [
90-
"E", # pycodestyle
91-
"F", # pyflakes
92-
"W", # pycodestyle
93-
"B", # bugbear
94-
"I", # isort
95-
"RUF", # ruff
96-
"UP", # pyupgrade
97-
]
98-
ignore = [
99-
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
100-
]

0 commit comments

Comments
 (0)