-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (116 loc) · 2.79 KB
/
pyproject.toml
File metadata and controls
130 lines (116 loc) · 2.79 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
# OpenTranscribe Python Project Configuration
[project]
name = "opentranscribe"
version = "0.4.1"
description = "AI-powered transcription application with speaker diarization and LLM features"
authors = [
{name = "OpenTranscribe Contributors"}
]
requires-python = ">=3.11"
[tool.black]
line-length = 100
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| venv
| _build
| buck-out
| build
| dist
| node_modules
)/
'''
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # Line too long - handled by black
"B008", # Do not perform function calls in argument defaults
"W191", # Indentation contains tabs
"B904", # Allow raising exceptions without from e, for HTTPException
]
[tool.ruff.lint.isort]
known-first-party = ["app"]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = true
strict_equality = true
ignore_missing_imports = true
namespace_packages = true
explicit_package_bases = true
mypy_path = "backend"
[[tool.mypy.overrides]]
module = [
"alembic.*",
"celery.*",
"whisperx.*",
"pyannote.*",
"minio.*",
"opensearchpy.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "alembic.versions.*"
ignore_errors = true
[tool.bandit]
exclude_dirs = ["tests", "venv", ".venv", "node_modules"]
skips = ["B101", "B404", "B601", "B607", "B608"] # Skip assert_used, subprocess_import, paramiko_calls, start_process_with_partial_path, hardcoded_sql_expressions
[tool.bandit.assert_used]
skips = ["*_test.py", "test_*.py"]
[tool.pytest.ini_options]
testpaths = ["backend/tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short --strict-markers"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
[tool.coverage.run]
source = ["app"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/venv/*",
"*/.venv/*",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false