-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
147 lines (124 loc) · 4.01 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
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "pytranscript"
version = "0.3.0"
description = "CLI to transcript and translate audio and video files"
readme = "README.md"
requires-python = ">=3.12"
license = { file = "LICENSE" }
keywords = ["transcript", "translation", "audio", "video", "subtitles"]
authors = [{ name = "arnaud-ma", email = "arnaudma.code@gmail.com" }]
classifiers = [ # https://pypi.org/classifiers/
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"deep-translator>=1.11.4",
"tqdm>=4.66.1",
"vosk>=0.3.45",
"ffmpeg-python>=0.2.0",
"typed_argument_parser>=1.9.0",
]
[project.optional-dependencies]
test = ["hypothesis>=6.92"]
[project.scripts]
pytranscript = "pytranscript:main"
[project.urls]
Documentation = "https://github.com/arnaud-ma/pytranscript#readme"
Repository = "https://github.com/arnaud-ma/pytranscript"
Source = "https://github.com/arnaud-ma/pytranscript"
Issues = "https://github.com/arnaud-ma/pytranscript/issues"
[tool.ruff.format]
indent-style = "space"
line-ending = "lf"
docstring-code-format = true
docstring-code-line-length = 72
skip-magic-trailing-comma = true
[tool.ruff]
fix = true
preview = true
unsafe-fixes = false
line-length = 88
src = ["src", "tests"]
[tool.ruff.lint]
preview = true
extend-select = ["ALL"]
extend-ignore = [
# undocumented docstrings
"D100", # public module
"D101", # public class
"D102", # public method
"D103", # public function
"D104", # public package
"D105", # magic method
"D106", # public nested class
"D107", # public init method
"D205", # blank line after summary
# TODO tags
"TD002", # author on TODO tag
"TD003", # link on TODO tag
"FIX002", # check for todo tags
"SLF001", # private member
"CPY", # Copyrigth
"ANN", # Annotations
"ARG001", # unused func arguments
"ARG002", # unused method arguments
"RET506", # Unnecessary `elif` after `raise` statement"
"PGH003", # code-error on type: ignore
# conflicts with formatter https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191", # tab indent
"W293", # blank line at end of file
"E111", # indentation is not a multiple of four
"E114", # indentation is not a multiple of four (comment)
"E117", # over-indented
"E701", # multiple statements on one line (colon)
"E702", # multiple statements on one line (semicolon)
"E703", # statement ends with a semicolon
"D206", # Docstring is indented
"D300", # Use """triple double quotes"""
"COM812", # missing trailing comma
"COM819", # trailing comma in a tuple
"ISC001", # missing space after comma
"ISC002", # missing space before comma
"I001", # isort
# debug
"T201", # print statements
# Unwanted
"FURB140", # itertools.starmap instead of comprehension
"PLR0904", # too many public methods
"ERA001", # commented code
]
# Disable fix for unused imports (`F401`)
unfixable = ["F401"]
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["S", "PLR2004", "PLR6301", "TID252"]
[tool.ruff.lint.pydocstyle]
# https://beta.ruff.rs/docs/settings/#pydocstyle-convention
convention = "google"
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
multiline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "parents"
[tool.ruff.lint.pylint]
max-args = 8
[tool.ruff.lint.mccabe]
max-complexity = 5
[tool.pyright]
# deactivate pyright features that are already covered by ruff
# actually only enables type checking
# https://microsoft.github.io/pyright/#/configuration?id=diagnostic-rule-defaults for more info
typeCheckingMode = "standard"
reportGeneralTypeIssues = true
reportMissingTypeStubs = false
reportUndefinedVariable = false
reportUnusedVariable = false
reportUnusedClass = false
reportUnusedFunction = false
reportUnaccessedMember = false