-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
106 lines (96 loc) · 2.63 KB
/
Copy pathpyproject.toml
File metadata and controls
106 lines (96 loc) · 2.63 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
[project]
name = "cueweaver"
version = "0.1.0"
description = "A self-hosted media subtitle translation tool"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"fastapi>=0.141.1",
"alembic>=1.14.0",
"langcodes[data]>=3.5.0",
"pydantic>=2.13.4",
"pysubtrans[azure,bedrock,claude,gemini,mistral,openai]==1.6.0",
"sqlalchemy>=2.0.0",
"starlette>=1.6.0",
"uvicorn>=0.35.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
# PySubtrans 1.6.0 uses the Mistral SDK v1 client API.
override-dependencies = ["mistralai<2"]
[dependency-groups]
dev = [
"httpx>=0.28.1",
"mypy>=1.13.0",
"pre-commit>=3.0.0",
"pymarkdownlnt>=0.9.0",
"pytest>=8.0",
"ruff>=0.8.0",
"tach>=0.30.0",
"vulture>=2.16",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.mypy]
python_version = "3.10"
files = ["cueweaver"]
explicit_package_bases = true
ignore_missing_imports = true
disallow_any_generics = true
no_implicit_optional = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
show_error_codes = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.ruff]
target-version = "py310"
line-length = 88
include = ["cueweaver/**/*.py", "tests/**/*.py"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PL", # Pylint
"PERF",# Perflint
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Long API prompts and protocol examples are intentionally long.
"RUF001", # Intentional Chinese punctuation in user-facing strings.
"RUF002", # Intentional Chinese punctuation in docstrings.
"RUF003", # Intentional Chinese punctuation in comments.
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"N802", # Test doubles mirror the external PySubtrans API.
"PLR2004", # HTTP status codes and fixture values are clear in assertions.
]
"cueweaver/application/translation/*" = [
"PLR0913", # The protocol mirrors the translator adapter's public API.
]
"cueweaver/translation.py" = [
"PLR0913", # The adapter exposes the translator configuration as one operation.
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "lf"
[tool.vulture]
paths = ["cueweaver", "tests", "vulture_whitelist.py"]