forked from fpgmaas/deptry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
202 lines (181 loc) · 4.47 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
190
191
192
193
194
195
196
197
198
199
200
201
202
[project]
name = "deptry"
version = "0.0.1"
description = "A command line utility to check for unused, missing and transitive dependencies in a Python project."
authors = [{ name = "Florian Maas", email = "[email protected]" }]
maintainers = [{ name = "Mathieu Kniewallner", email = "[email protected]" }]
requires-python = ">=3.8"
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
"Programming Language :: Python",
"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",
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"click>=8.0.0,<9",
"colorama>=0.4.6; sys_platform == 'win32'",
"tomli>=2.0.1; python_version < '3.11'"
]
[tool.pdm.dev-dependencies]
dev = [
# Support for Python 3.8 was dropped by pre-commit in https://github.com/pre-commit/pre-commit/releases/tag/v3.6.0
"pre-commit==3.7.1; python_version >= '3.9'",
"pytest==8.2.0",
"pytest-cov==5.0.0",
"pytest-xdist[psutil]==3.6.1",
]
docs = [
"mkdocs==1.6.0",
"mkdocs-material==9.5.23",
]
typing = [
"mypy==1.10.0",
"types-colorama==0.4.15.20240311; sys_platform == 'win32'",
]
[project.urls]
homepage = "https://deptry.com"
repository = "https://github.com/fpgmaas/deptry"
documentation = "https://deptry.com"
changelog = "https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md"
[project.scripts]
deptry = "deptry.cli:deptry"
[build-system]
requires = ["maturin>=1.5,<2.0"]
build-backend = "maturin"
[tool.maturin]
features = ["pyo3/extension-module"]
python-source = "python"
module-name = "deptry.rust"
[tool.coverage.report]
skip_empty = true
# Subset of rules from https://pypi.org/project/covdefaults/
exclude_lines = [
# a more strict default pragma
"# pragma: no cover\\b",
# allow defensive code
"^\\s*raise AssertionError\\b",
"^\\s*raise NotImplementedError\\b",
"^\\s*return NotImplemented\\b",
"^\\s*raise$",
# typing-related code
"^\\s*if (False|TYPE_CHECKING):",
": \\.\\.\\.(\\s*#.*)?$",
"^ +\\.\\.\\.$",
"-> ['\"]?NoReturn['\"]?:",
# non-runnable code
"if __name__ == ['\"]__main__['\"]:$",
]
[tool.coverage.run]
branch = true
source = ["python/deptry"]
[tool.mypy]
mypy_path = "python"
files = ["python/deptry", "scripts", "tests"]
explicit_package_bases = true
exclude = ["tests/data"]
disallow_any_unimported = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
strict = true
warn_unreachable = true
pretty = true
show_error_codes = true
[[tool.mypy.overrides]]
module = ["xdist.*"]
ignore_missing_imports = true
[tool.deptry]
extend_exclude = [
"docs",
"tests",
"scripts",
]
[tool.deptry.per_rule_ignores]
DEP001 = ["tomllib"]
[tool.pytest.ini_options]
addopts = "--doctest-modules"
filterwarnings = ["error"]
norecursedirs = ["data*"]
[tool.ruff]
target-version = "py38"
line-length = 120
fix = true
extend-exclude = ["tests/data/*"]
[tool.ruff.format]
preview = true
[tool.ruff.lint]
select = [
# flake8-2020
"YTT",
# flake8-bandit
"S",
# flake8-blind-except
"BLE",
# flake8-bugbear
"B",
# flake8-builtins
"A",
# flake8-comprehensions
"C4",
# flake8-debugger
"T10",
# flake8-logging-format
"G",
# flake8-no-pep420
"INP",
# flake8-print
"T20",
# flake8-pytest-style
"PT",
# flake8-simplify
"SIM",
# flake8-type-checking
"TCH",
# flake8-use-pathlib
"PTH",
# isort
"I",
# mccabe
"C90",
# pep8-naming
"N",
# pycodestyle
"E", "W",
# pyflakes
"F",
# pygrep-hooks
"PGH",
# pyupgrade
"UP",
# ruff
"RUF",
# tryceratops
"TRY",
]
ignore = [
# LineTooLong
"E501",
# DoNotAssignLambda
"E731",
]
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.ruff.lint.isort]
known-first-party = ["deptry"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S603"]