-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
146 lines (130 loc) · 3.82 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
[project]
name = "lzallright"
authors = [
{name = "László Vaskó", email = "[email protected]"},
]
dependencies = []
requires-python = ">=3.8"
dynamic = [
'description',
'license',
'readme',
'version'
]
[project.urls]
Homepage = "https://vlaci.github.io/lzallright"
Repository = "https://github.com/vlaci/lzallright"
Changelog = "https://github.com/vlaci/lzallright/blob/main/CHANGELOG.md"
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.maturin]
python-source = "python"
module-name = "lzallright._lzallright"
features = [
"pyo3/extension-module", # This is an extension module
"pyo3/abi3-py38" # https://docs.python.org/3/c-api/stable.html
]
[tool.towncrier]
directory = "changelog.d"
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\n"
underlines = ["", "", ""]
template = "changelog.d/changelog_template.jinja"
title_format = "## [{version}](https://github.com/vlaci/lzallright/tree/v{version}) - {project_date}"
issue_format = "[#{issue}](https://github.com/vlaci/lzallright/issues/{issue})"
[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[tool.pdm.scripts]
changelog = "towncrier"
venv = "pdm sync -d"
mypy = "mypy ."
pytest = "python -m pytest tests"
clippy = "cargo clippy --all-targets -- --deny warnings"
cargofmt = "cargo fmt"
ruff-format = "ruff format"
ruff-check = "ruff check"
test = "cargo test"
all = { composite = ["clippy", "cargofmt", "test", "venv", "ruff-check", "ruff-format", "mypy", "pytest"] }
[tool.pdm.dev-dependencies]
dev = [
"ruff ~=0.7.4",
"mypy ~= 1.2",
"towncrier ~=24.8.0",
]
test = [
"pytest ~=8.3.3",
]
docs = [
"mkdocs>=1.4.3",
"mkdocstrings[python]>=0.22.0",
"mkdocs-material>=9.1.14",
]
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C90", # mccabe
"C4", # flake8-comprehensions
"COM818", # flake8-commas; trailing-comma-on-bare-tuple
"D", # pydocstyle
"E", # pycodestyle (errors)
"F", # pyflakes
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"N", # pep8-naming
"PIE", # flake8-pie
"PYI", # flake8-pyi
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # ruff's own lints
"RSE", # flake8-raise
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle (warnings)
]
ignore = [
"D203", # one-blank-line-before-class: D211 (no-blank-line-before-class) is used instead
"D213", # multi-line-summary-second-line: D212 (multi-line-summary-first-line) is used instead
"E501", # line-too-long: Let black handle line length violations
"PYI021", # docstring-in-stub: We document in the stub
"UP006", # non-pep585-annotation: For Python 3.8 compatibility
"UP007", # non-pep604-annotation: For Python 3.8 compatibility
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # assert: Enable usage of asserts
"D1", # undocumented-*
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["lzallright"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
parametrize-names-type = "csv"