-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (79 loc) · 2.37 KB
/
pyproject.toml
File metadata and controls
89 lines (79 loc) · 2.37 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
[project]
name = "ai-tools"
version = "1.0.0"
description = "AI Tools - Speech recognition, transcription, and NLP services"
requires-python = ">=3.11"
[tool.ruff]
line-length = 100
indent-width = 4
target-version = "py311"
exclude = [
".venv",
".ruff_cache",
"build",
"dist",
"__pycache__",
"*.spec",
"notebooks",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Line too long (handled by formatter)
"B008", # Function call in default argument (common in FastAPI)
"SIM105", # Use contextlib.suppress (not always clearer)
"SIM108", # Use ternary operator (can reduce readability)
"SIM117", # Nested with statements (sometimes more readable)
"E722", # Bare except (sometimes needed for cleanup)
"RUF001", # Ambiguous unicode (emoji in strings)
]
fixable = ["ALL"]
[tool.ruff.lint.per-file-ignores]
# Allow imports after sys.path manipulation
"apps/live-captions/live_captions_tray.py" = ["E402"]
# Allow imports after sys.modules manipulation for mocking
"services/text-refiner/test_text_refiner_service.py" = ["E402"]
# Allow unused imports for side effects (flash_attn availability check)
"services/whisper/whisper_service.py" = ["F401"]
# Allow redefinition of logger (module-specific logging)
"services/audio-notes/services/*.py" = ["F811"]
# Allow exception chaining flexibility in audio-notes API
"services/audio-notes/api/routes.py" = ["B904"]
[tool.ruff.lint.isort]
known-first-party = ["shared", "src"]
[tool.black]
line-length = 100
target-version = ["py311"]
exclude = '''
/(
\.venv
| build
| dist
| __pycache__
| notebooks
)/
'''
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["apps", "shared", "services", "tests"]
python_files = ["*_test.py", "test_*.py"]
markers = [
"e2e: End-to-end tests (require Docker services running)",
]
# E2E test timeout (seconds) - prevents hanging tests, allows for model loading
timeout = 120
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_ignores = true
ignore_missing_imports = true