This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
107 lines (93 loc) · 2.14 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
[build-system]
build-backend = "pdm.backend"
requires = ["pdm-backend"]
[project]
authors = [
{name = "Tohrusky", email = "[email protected]"}
]
classifiers = [
"Programming Language :: Python :: 3"
]
dependencies = [
"loguru==0.7.0",
"opencv_python~=4.7.0.72",
"pymediainfo==6.0.1",
"pyperclip~=1.8.2",
"PyYAML~=6.0",
"requests==2.31.0",
"PySocks~=1.7.1",
"tenacity==8.2.2",
"torrentool~=1.1.1",
"lxml~=4.9.1"
]
license = {text = "MIT License"}
name = "ptf"
readme = "README.md"
requires-python = ">=3.8, <3.13"
version = "0.0.1"
[tool.coverage.run]
omit = ["src"]
[tool.mypy]
disable_error_code = "attr-defined"
disallow_any_generics = false
ignore_missing_imports = true
strict = true
warn_return_any = false
[tool.pdm.dev-dependencies]
lint = [
"pre-commit",
"ruff",
"mypy"
]
test = [
"pytest",
"pytest-cov",
"types-PyYAML",
"types-requests",
"pyinstaller~=6.3"
]
[tool.pdm.scripts]
[tool.pdm.scripts.lint]
composite = [
"mypy src tests",
"ruff check . --fix --exit-non-zero-on-fix",
"ruff format ."
]
help = "Check code style against linters"
[tool.pdm.scripts.post_install]
composite = [
"pre-commit install"
]
help = "Install the pre-commit hook"
[tool.pdm.scripts.post_pyinstaller]
call = "scripts.post_pyinstaller:post_pyinstaller"
help = "Copy config to the dist folder"
[tool.pdm.scripts.pyinstaller]
cmd = "pyinstaller -n ptf -i assets/favicon.ico src/ptf/__main__.py"
help = "Build the executable with PyInstaller"
[tool.pdm.scripts.test]
cmd = "pytest tests --cov=src --cov-report=xml --cov-report=html"
help = "Run tests with coverage"
[tool.ruff]
extend-ignore = ["B018", "B019", "PGH003", "E721", "C408", "RUF012", "RUF001", "RUF003"]
extend-select = [
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PGH", # pygrep-hooks
"RUF", # ruff
"W", # pycodestyle
"YTT" # flake8-2020
]
fixable = ["ALL"]
line-length = 120
[tool.ruff.format]
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false
[tool.ruff.isort]
combine-as-imports = true
known-first-party = ["pdm"]
[tool.ruff.mccabe]
max-complexity = 10