-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
179 lines (160 loc) · 3.64 KB
/
Copy pathpyproject.toml
File metadata and controls
179 lines (160 loc) · 3.64 KB
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
[project]
name = "dualentry-cli"
version = "0.1.18"
description = "DualEntry accounting CLI"
requires-python = ">=3.11"
dependencies = [
# Floor is 0.26, not 0.12: typer 0.26.0 (2026-05-26) vendored click into
# typer._click and dropped click from its own dependencies. That is a
# breaking change for us on both counts:
# - typer._click.exceptions does not exist before 0.26, and
# - click is no longer installed transitively, so importing it is not an
# option either (it is not a direct dependency of this project).
# HelpfulGroup in cli.py catches typer._click.exceptions.UsageError, which
# is the class TyperGroup.resolve_command actually raises.
"typer>=0.26,<1.0",
"httpx>=0.27,<1.0",
"keyring>=25.0,<26.0",
"rich>=13.0,<14.0",
]
[project.scripts]
dualentry = "dualentry_cli.main:main_entrypoint"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/dualentry_cli"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=6.0",
"pytest-mock>=3.14",
"respx>=0.21",
"ruff>=0.11.11",
"pre-commit>=4.2",
"pyinstaller>=6.0",
]
# ── Ruff ───────────────────────────────────────────────────────────────
[tool.ruff.format]
quote-style = "preserve"
[tool.ruff]
line-length = 180
target-version = "py311"
exclude = [".venv"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ERA001",
"D100",
"D101",
"D102",
"D103",
"D104",
"D106",
"D107",
"TD002",
"RUF012",
"FIX002",
"TD003",
"D203",
"D211",
"D212",
"PD011",
"TRY301",
"COM812",
"ISC001",
"E501",
"ANN002",
"ANN003",
"ANN201",
"ANN001",
"ANN205",
"ANN202",
"ANN204",
"BLE001",
"B008",
"TRY002",
"B039",
"RUF034",
"RUF032",
"PLW1508",
"SIM115",
"RUF046",
# CLI-specific: Typer uses bool args and deferred imports for circular dep avoidance
"FBT001",
"FBT002",
"FBT003",
"PLC0415",
"PLR0913",
"PLR2004",
"A002",
"TC003",
"C901",
"ARG001",
"PT006",
"D105",
"D205",
"D401",
"TRY400",
"EM101",
"EM102",
"TRY003",
"SLF001",
"UP007",
"S101",
"S110",
"T201",
"PLW0603",
"PLW2901",
"PLR0912",
"PLR0915",
"F841",
"SIM105",
"PLR0917",
# Added to ALL in ruff 0.16.0. This project declares no license and ships no
# LICENSE file, so there is no copyright header to require.
"CPY001",
]
[tool.ruff.lint.per-file-ignores]
"scripts/*" = ["INP001", "S603", "PLR0911"]
"tests/*" = [
"S101",
"S105",
"S106",
"PLR2004",
"INP001",
"PLR0913",
"ANN001",
"ANN003",
"ANN201",
"S311",
]
[tool.ruff.lint.isort]
known-first-party = ["dualentry_cli"]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.pycodestyle]
max-doc-length = 120
[tool.ruff.lint.mccabe]
max-complexity = 10
# ── Coverage ───────────────────────────────────────────────────────────
[tool.coverage.run]
branch = true
relative_files = true
source = ["src/dualentry_cli"]
omit = ["*/tests/*"]
[tool.coverage.report]
show_missing = true
exclude_also = [
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]