-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
148 lines (133 loc) · 3.18 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project]
name = "pytwitch"
description = "Simple menu tool for launching Twitch streams."
readme = "README.md"
keywords = ["cli", "dmenu", "rofi", "twitch", "utility"]
license = { file = "LICENSE.txt" }
authors = [{ name = "haaag", email = "[email protected]" }]
requires-python = ">=3.8"
dynamic = ["version"]
dependencies = [
"pyselector==0.0.41",
"httpx==0.23.3",
"python-dotenv",
"sh==2.0.7",
"pydantic==2.7.4",
"tenacity==8.4.2",
"PyYAML==6.0.1",
"click==8.1.7",
]
[tool.hatch.build.targets.wheel]
packages = ["src/twitch"]
[project.scripts]
pytwitch = "twitch.__main__:main"
tt = "twitch.cli:cli"
[tool.hatch.version]
path = "src/twitch/__about__.py"
[tool.pytest.ini_options]
pythonpath = "src"
testpaths = ["tests"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
[tool.mypy]
hide_error_codes = false
show_error_code_links = true
enable_error_code = ["ignore-without-code"]
show_error_context = true
show_column_numbers = true
ignore_missing_imports = true
pretty = true
warn_no_return = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = "yaml.*"
ignore_missing_imports = true
[tool.ruff]
fix = false
line-length = 120
show-fixes = true
target-version = "py37"
exclude = [".venv", ".mypy_cache", ".pytest_cache"]
[tool.ruff.format]
quote-style = "single"
line-ending = "auto"
skip-magic-trailing-comma = false
docstring-code-format = true
[tool.ruff.lint.pylint]
max-args = 7
[tool.ruff.lint]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
task-tags = ["HACK", "FIX", "BUG"]
select = [
"A",
"ARG",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
# "Q",
"RUF",
"S",
"T",
"TID",
"UP",
"W",
"YTT",
]
extend-select = [
"B", # (flake8-bugbear)
"BLE", # (flake8-blind-except)
"C4", # (flake8-comprehensions)
# "ERA", # (eradicate)
"I", # (isort)
"ICN", # (flake8-import-conventions)
"INP", # (flake8-no-pep420)
"N", # (pep8-naming)
"NPY", # (numpy-specific-rules)
"PGH", # (pygrep-hooks)
"PIE", # (flake8-pie)
"PTH", # (flake8-use-pathlib)
# "Q", # (flake8-quotes)
"RET", # (flake8-return)
"RSE", # (flake8-raise)
"RUF", # (ruff-specific-rules)
"S", # (flake8-bandit)
"SIM", # (flake8-simplify)
"T20", # (flake8-print)
"TCH", # (flake8-type-checking)
"TID", # (flake8-tidy-imports)
"YTT", # (flake8-2020)
]
ignore = ["Q000", "Q003", "FBT001", "FBT002", "ARG002", "FBT003"]
[tool.ruff.lint.isort]
force-single-line = true
order-by-type = true
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"src/twitch/player.py" = ["S603", "A001"]
"src/twitch/__about__.py" = ["I002"]
"src/twitch/setup.py" = ["T201"]
"src/twitch/app.py" = ["FBT003"]
"tests/**/*" = [
"S101", # use of `assert` detected
"ARG002", # unused-method-argument
"Q000", # single-quote preferred
"FBT001", # boolean-type-hint-positional-argument
"FBT002", # boolean-default-value-positional-argument
"A003", # builtin-attribute-shadowing
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"