-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
60 lines (50 loc) · 1.26 KB
/
pyproject.toml
File metadata and controls
60 lines (50 loc) · 1.26 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
[tool.pylsp-mypy]
overrides = ["--ignore-missing-imports", true]
[tool.mypy]
ignore_missing_imports = true
[tool.pyright]
reportMissingImports = false
reportMissingModuleSource = false
# PyObjC specific ignores
[[tool.mypy.overrides]]
module = ["Foundation.*", "AppKit.*", "objc.*"]
ignore_missing_imports = true
ignore_errors = true
# Ruff 配置 (替代 black + isort + flake8)
[tool.ruff]
line-length = 138
target-version = "py38"
exclude = [
".git",
"__pycache__",
".venv",
"venv",
"build",
"dist",
"*.egg-info",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
]
ignore = [
"E203", # whitespace before ':' (black 兼容)
"E402", # module level import not at top of file (有意设计,如文档后导入)
"E501", # line too long (由 formatter 处理)
"F401", # imported but unused
"F403", # from . import * (有意使用)
]
[tool.ruff.format]
# 使用 Black 兼容的格式化配置
[tool.ruff.lint.isort]
# Black-compatible import sorting
from-first = true
combine-as-imports = true
lines-after-imports = 2
# Coverage 配置
[tool.coverage.run]
source = ["app", "data_manager", "utils"]
omit = ["*/tests/*", "*/test_*.py", "setup.py"]