-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
174 lines (158 loc) · 5.57 KB
/
pyproject.toml
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
[project]
name = "whispersubs"
dynamic = ["version", "dependencies", "optional-dependencies"]
description = 'Transcribe audio/video files into subtitles'
readme = "README.md"
requires-python = ">=3.8"
license = { text = "LGPL-3.0" }
keywords = ["transcription", "subtitles", "audio", "video", "whisper"]
authors = [
{ name = "abk16", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
]
[project.urls]
Homepage = "https://github.com/andreabak/whispersubs"
Documentation = "https://github.com/andreabak/whispersubs#readme"
Issues = "https://github.com/andreabak/whispersubs/issues"
Source = "https://github.com/andreabak/whispersubs"
[project.scripts]
whispersubs = "whispersubs.__main__:main"
[build-system]
requires = ["hatchling", "hatch-requirements-txt", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.txt"]
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
cuda = ["requirements-cuda.txt"]
dev = ["requirements-dev.txt"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "whispersubs/_version.py"
[tool.hatch.build.targets.sdist]
include = [
"whispersubs",
]
[tool.ruff]
fix = true
show-fixes = true
preview = true
line-length = 100
[tool.ruff.lint]
ignore-init-module-imports = true
select = [
# entire rule-sets
"F", # PyFlakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"N", # PEP8 naming
"D", # PyDocStyle
"UP", # PyUpgrade
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EXE", # flake8-executable
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"T20", # flake8-print
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"TD", # flake8-todos
"FIX", # flake8-fixme
"ERA", # flake8-eradicate
"PGH", # flake8-pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
"FLY", # flynt
"PERF", # perflint
"FURB", # refurb
"LOG", # flake8-logging
"RUF", # ruff-specific-rules
# explicit rules
"G010", # logging statement uses `warn` instead of `warning`
"G101", # logging statement uses an `extra` field that clashes with LogRecord
"G201", # `logging.exception` should be used instead of `logging.error(..., exc_info=True)`
"G202", # logging statement has redundant `exc_info`
"ISC003", # explicitly concatenated string should be implicitly concatenated
]
ignore = [
"ARG002", # unused method argument
"ARG003", # unused class method argument
"B904", # use `raise from` within except
"C408", # unnecessary dict call - rewrite as a literal
"D105", # missing docstring in magic method
"D107", # missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # multi-line docstring summary should start at the first line
"F403", # `from module import *` used; unable to detect undefined names
"FBT003", # boolean positional value in function call
"N816", # variable in global scope should not be mixedCase
"N818", # exception should be named with an `Error` suffix
"PLW0602", # `global` for variable but no assignment
"PT018", # assertions should be broken down into multiple parts
"PTH123", # open() should be replaced by Path.open()
"RET505", # unnecessary else/elif after return statement
"S101", # use of assert detected
"S307", # usage of builtin `eval()`
"S311", # cryptographic usage of `random` module
"S320", # usage of `lxml`
"S404", # usage of `subprocess` module
"S603", # subprocess call - check for execution of untrusted input
"SIM105", # prefer `contextlib.suppress` over `try/except/pass`
"TD001", # invalid TODO tags
"TD002", # author name in TODOs
"TD003", # issue link in TODOs
"TRY003", # long message in exception call
"TRY301", # raise within try - abstract raise to an inner function
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D", "S", "T", "SLF001", "PLR2004", "PLR6301"]
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
max-line-length = 120
[tool.ruff.lint.isort]
combine-as-imports = true
lines-after-imports = 2
[tool.ruff.lint.pylint]
max-args = 10
max-bool-expr = 8
max-branches = 20
max-returns = 8
max-public-methods = 25
max-statements = 70
[tool.mypy]
show_error_codes = true
ignore_missing_imports = true
warn_return_any = true
allow_redefinition = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
plugins = ["numpy.typing.mypy_plugin"]