-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
115 lines (103 loc) · 2.42 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
[project]
name = "torchlight"
dynamic = ["version"]
description = "Stream music and more for srcds games"
readme = "README.md"
authors = [
{name = "BotoX", email = "[email protected]"},
]
classifiers = [
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
]
requires-python = ">=3.10"
dependencies = [
"Pillow",
"aiohttp",
"beautifulsoup4",
"click",
"defusedxml",
"gTTS",
"geoip2",
"lxml",
"python-magic",
"yt-dlp @ git+https://github.com/yt-dlp/yt-dlp@master#egg=yt-dlp"
]
[project.scripts]
torchlight = "torchlight.cli:cli"
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["*.tests", "*.tests.*", "tests.*", "tests"]
[tool.setuptools.dynamic]
version = {file = "VERSION"}
[project.optional-dependencies]
dev = [
"memory_profiler",
"mypy",
"ruff",
]
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
no_implicit_optional = true
show_error_codes = true
files = "src"
[tool.ruff]
target-version = "py310"
line-length = 120
exclude = [
".bzr",
".git",
".svn",
".hg",
"typings"
]
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules/
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"Q", # flake8-quotes-q
"S", # flake8-bandit-s
"UP", # pyupgrade
"W", # pycodestyle
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
combine-as-imports = true
force-wrap-aliases = true
forced-separate = ["tests"]
known-local-folder = [
"torchlight",
"src",
"tests"
]
known-first-party = [
]
# required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"*/__init__.py" = [
"F401"
]
"alembic/*" = [
"S608", # Possible SQL injection vector through string-based query construction
]
"tests/**/*.py" = [
"S101", # asserts allowed in tests
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
# "S603", # `subprocess` call: check for execution of untrusted input
]
[tool.ruff.lint.pycodestyle]
max-line-length = 120