-
Notifications
You must be signed in to change notification settings - Fork 22
/
pyproject.toml
189 lines (177 loc) · 4.03 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
[tool.pytest.ini_options]
minversion = "7.2"
addopts = [
"-rA"
]
testpaths = [
"tests",
]
[tool.poetry]
name = "pygount"
version = "1.8.1"
description = "count source lines of code (SLOC) using pygments"
readme = "README.md"
authors = ["Thomas Aglassinger <roskakori@users.sourceforge.net>"]
license = "BSD"
homepage = "https://github.com/roskakori/pygount"
repository = "https://github.com/roskakori/pygount.git"
documentation = "https://pygount.readthedocs.io"
keywords = ["code analysis", "count", "SLOC"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development",
]
packages = [
{ include = "pygount" },
]
[tool.poetry.dependencies]
python = ">=3.8, <3.13" # NOTE We cannot use <4 because of coveralls.
pygments = "^2"
chardet = "^5"
rich = ">=9, <14"
gitpython = "^3"
[tool.poetry.dev-dependencies]
coveralls = "^4"
coverage = "^7"
pytest = "^8"
pytest-cov = "^5"
pre-commit = "^3.5" # TODO#158: Change to "^3".
pur = "^7"
ruff = "^0.5.1"
twine = "^5"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
Sphinx = "^7"
[tool.poetry.scripts]
pygount = "pygount.command:main"
[tool.poetry.urls]
"Issue Tracker" = "https://github.com/roskakori/pygount/issues"
"Changes" = "https://pygount.readthedocs.io/en/latest/changes.html"
[tool.ruff]
exclude = [
".eggs",
".git",
".pytest_cache",
".pytype",
".ruff_cache",
".vscode",
"__pypackages__",
"_build",
"build",
"dist",
"htmlcov",
]
line-length = 120
target-version = "py38"
[tool.ruff.lint]
ignore = [
# Missing trailing comma → May cause conflicts when used with the formatter.
"COM812",
# Too many branches
"PLR0912",
# Too many arguments in function definition
"PLR0913",
# Too many statements
"PLR0915",
# Magic value used in comparison
"PLR2004",
# TODO#89 Enable checks for usage of pathlib.
"PTH100",
"PTH103",
"PTH107",
"PTH109",
"PTH110",
"PTH112",
"PTH114",
"PTH118",
"PTH119",
"PTH120",
"PTH122",
"PTH123",
"PTH202",
"PTH207",
# Unneccesarry assign → We regularly use `result = ...; return result` to examine the result in the debugger.
"RET504",
# TODO#506 Enable RUF012 check for mutable class attributes.
# Mutable class attributes should be annotated with `typing.ClassVar`
"RUF012",
# Avoid specifying long messages outside the exception class
"TRY003",
# Abstract `raise` to an inner function
"TRY301",
]
select = [
# flake8-builtins
"A",
# flake8-bugbear
"B",
# flake8-commas
"COM",
# flake8-comprehensions
"C4",
# flake8-django
"DJ",
# flake8-datetimez
"DTZ",
# pycodestyle
"E",
# Pyflakes
"F",
# isort
"I",
# flake8-no-pep420
"INP",
# flake8-gettext
"INT",
# flake8-logging
"LOG",
# perflint
"PERF",
# pygrep-hooks
"PGH",
# flake8-pie
"PIE",
# pylint
"PL",
# flake8-use-pathlib
"PTH",
# refactor
"R",
# flake8-raise
"RSE",
# flake8-return
"RET",
# ruff specific rules
"RUF",
# flake8-self
"SLF",
# flake8-simplify
"SIM",
# tryceratops
"TRY",
# flake8-debugger
"T10",
# flake8-print
"T20",
# pyupgrade
"UP",
]
[tool.ruff.lint.isort]
known-first-party = ["pygount", "scripts", "tests"]
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["INP001"]
[build-system]
requires = ["poetry-core>=1.8.1"]
build-backend = "poetry.core.masonry.api"