-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
251 lines (212 loc) · 6.08 KB
/
Copy pathpyproject.toml
File metadata and controls
251 lines (212 loc) · 6.08 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
[project]
name = "vcf-generator-lite"
version = "5.0.4"
description = "A lightweight VCF creation tool written in Python."
authors = [{ name = "Jesse205", email = "jesse205@qq.com" }]
license = "Apache-2.0"
license-files = ["LICENSE"]
readme = "README_pypi.md"
requires-python = ">=3.12"
dependencies = ["ttk-text==0.3.4"]
import-names = ["vcf_generator_lite"]
[project.optional-dependencies]
console = ["colorlog>=6.9.0"]
[dependency-groups]
basic = ["poethepoet>=0.46.0"]
lint = ["pyright>=1.1.409", "ruff>=0.15.13"]
test = ["pytest>=9.0.3"]
build = ["packaging>=26.2", "pyinstaller>=6.20.0", "requests>=2.34.2"]
docs = ["jinja2>=3.1.6"]
l10n = ["babel>=2.18.0"]
dev = [
"colorlog>=6.9.0",
{ include-group = "basic" },
{ include-group = "lint" },
{ include-group = "test" },
{ include-group = "build" },
{ include-group = "docs" },
{ include-group = "l10n" },
]
[project.urls]
Repository = "https://gitee.com/hellotool/VCFGeneratorLiteWithTkinter"
Github = "https://github.com/hellotool/VCFGeneratorLiteWithTkinter"
Issues = "https://gitee.com/hellotool/VCFGeneratorLiteWithTkinter/issues/new/choose"
[project.gui-scripts]
vcf-generator-lite = "vcf_generator_lite.__main__:main"
[build-system]
requires = ["uv_build>=0.11.3,<0.12"]
build-backend = "uv_build"
[tool.poe]
executor = "uv"
[tool.poe.tasks]
[tool.poe.tasks.test]
help = "Run tests"
cmd = "pytest"
[tool.poe.tasks.format]
help = "Format code"
cmd = "ruff format"
[tool.poe.tasks.check]
help = "Check code"
parallel = ["ruff check", "pyright"]
ignore_fail = "return_non_zero"
default_item_type = "cmd"
[tool.poe.tasks.fix]
help = "Fix code"
cmd = "ruff check --fix"
[tool.poe.tasks.build-installer]
help = "Build installer (*-setup.exe)"
script = "scripts.build_app:build_installer"
[[tool.poe.tasks.build-installer.args]]
help = "Don't verify SSL"
name = "no_verify_ssl"
options = ["--no-verify-ssl"]
type = "boolean"
[[tool.poe.tasks.build-installer.args]]
help = "Force rebuild upstream outputs (PyInstaller dist)"
name = "force"
options = ["--force"]
type = "boolean"
[[tool.poe.tasks.build-installer.args]]
help = "Force online download InnoSetup extensions"
name = "force_download"
options = ["--force-download"]
type = "boolean"
[tool.poe.tasks.build-portable]
help = "Build portable package (*-portable.zip)"
script = "scripts.build_app:build_portable"
[[tool.poe.tasks.build-portable.args]]
help = "Force rebuild upstream outputs (PyInstaller dist)"
name = "force"
options = ["--force"]
type = "boolean"
[tool.poe.tasks.build-zipapp]
help = "Build zipapp (*.pyzw)"
script = "scripts.build_app:build_zipapp"
[[tool.poe.tasks.build-zipapp.args]]
help = "Force rebuild upstream outputs (wheel)"
name = "force"
options = ["--force"]
type = "boolean"
[tool.poe.tasks.build-wheel]
help = "Build wheel (*.whl)"
cmd = "uv build --wheel"
[tool.poe.tasks.l10n-extract]
help = "Extract localization files"
script = "scripts.l10n:extract"
[tool.poe.tasks.l10n-init]
help = "Initialize localization files"
script = "scripts.l10n:initialize"
[[tool.poe.tasks.l10n-init.args]]
help = "Locale"
name = "locale"
options = ["-l", "--locale"]
type = "string"
required = true
[tool.poe.tasks.l10n-update]
help = "Update localization files"
script = "scripts.l10n:update"
[tool.poe.tasks.l10n-compile]
help = "Compile localization files"
script = "scripts.l10n:compile_"
[[tool.poe.tasks.l10n-compile.args]]
help = "Locale"
name = "locale"
options = ["-l", "--locale"]
type = "string"
[tool.poe.tasks.gen-notices]
help = "Generate NOTICES files"
script = "scripts.gen_notices:render"
[tool.uv]
required-version = ">=0.10.1"
[tool.uv.pip]
universal = true
[tool.uv.build-backend]
source-exclude = ["*.pot", "*.po"]
[tool.ruff]
line-length = 120
include = [
"pyproject.toml",
# "*.md",
# "docs/**/*.md",
"src/**/*.py",
"tests/**/*.py",
"scripts/**/*.py",
"packaging/**/*.py",
"packaging/pyinstaller/*.spec",
]
[tool.ruff.lint]
ignore = [
"D100", # 有时候文档不是必须的
"D101",
"D102",
"D103",
"D104",
"D107",
"D400", # 不支持中文标点
"PLC0415", # 为了防止兼容性问题或者不必要的代码运行,需要将导入放到函数内。
"FBT001", # 在设置单个值时不需要命名参数
"FBT003",
"ICN001", # 很多情况下简写语义不明,要尽量避免简写
"T201", # 有 CLI 需求
"PLR0913", # 参数多不是问题,问题是参数多且没使用命名参数
"PLR2004", # 有时候,一些长度判断、常见状态码不需要常量
"S113", # 万一就是要等很长时间
"ANN003", # 无法做到
"ANN201", # 为了保持简洁,None 类型不写返回类型
"ANN202",
"ANN204",
"COM812", # 可能与 Formatter 冲突
"TRY003", # 没有必要
"EM101",
"EM102",
]
select = ["ALL"]
allowed-confusables = [",", ":", "(", ")", ";"] # 允许中文符号
exclude = ["tests/**"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.format]
docstring-code-format = true
line-ending = "lf"
[tool.pyright]
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
deprecateTypingAliases = true
typeCheckingMode = "strict"
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportUnknownArgumentType = "none"
reportIncompatibleVariableOverride = "none"
reportMissingParameterType = "none"
reportUnknownVariableType = "none"
reportUnnecessaryIsInstance = "none"
reportImplicitOverride = "error"
include = [
"src/**/*.py",
"tests/**/*.py",
"scripts/**/*.py",
"packaging/**/*.py",
"packaging/pyinstaller/*.spec",
]
pythonVersion = "3.12"
[[tool.pyright.executionEnvironments]]
root = "tests"
reportPrivateUsage = "none"
[tool.pytest]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
strict_config = true
strict_markers = true
strict_xfail = true
filterwarnings = ["error", "ignore::DeprecationWarning"]
log_cli = true
log_cli_level = "INFO"
[tool.babel]
[[tool.babel.mappings]]
encoding = "utf-8"
method = "python"
pattern = "**.py"
keywords = ["pgettext_menu_label:1c,2", "LazyPgettext:1c,2"]