-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
193 lines (166 loc) · 5.46 KB
/
Copy pathpyproject.toml
File metadata and controls
193 lines (166 loc) · 5.46 KB
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "RGO-lib-parser"
version = "1.4.0" # Не забудь обновлять версию при релизах
description = "Simple thing for a simple task - a parser!"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
authors = [
{ name = "diam0voi", email = "diam0voi@users.noreply.github.com" },
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Topic :: Utilities",
"Development Status :: 4 - Beta",
"Environment :: Console",
"Environment :: Win32 (MS Windows)",
"Environment :: MacOS X",
"Environment :: X11 Applications",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU Affero General Public License v3.0 only"
]
dependencies = [
"Pillow>=11.0.0,<12.0.0",
"Requests>=2.32.0,<3.0.0",
]
[project.urls]
Homepage = "https://github.com/diam0voi/RGO-lib-parser"
Issues = "https://github.com/diam0voi/RGO-lib-parser/issues"
# Устанавливаются через `uv run setup`
[project.optional-dependencies]
dev = [
"pytest>=8.0.0,<9.0.0",
"pytest-mock>=3.10.0,<4.0.0",
"pytest-cov>=4.1.0,<6.0.0",
"coverage[toml]>=4.1.0,<8.0.0",
"coveralls>=3.0.0,<4.0.0",
"ruff>=0.4.0",
"pre-commit>=3.0.0,<4.0.0",
"mypy>=1.0,<2.0",
"types-requests",
"types-Pillow",
"lxml",
]
# --- Настройки инструментов ---
[tool.ruff]
src = ["src"]
line-length = 88
target-version = "py39"
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors (базовые ошибки стиля)
"W", # pycodestyle warnings (предупреждения стиля)
"F", # Pyflakes (логические ошибки, неиспользуемые переменные/импорты)
"I", # isort (сортировка импортов)
"UP", # pyupgrade (модернизация синтаксиса Python до target-version)
"B", # flake8-bugbear (потенциальные баги и сомнительные практики)
"C4", # flake8-comprehensions (стиль списковых включений и генераторов)
"SIM", # flake8-simplify (упрощение кода, например, `if cond: return True else: return False` -> `return cond`)
"A", # flake8-builtins (предупреждает о переопределении встроенных имен)
"ISC", # flake8-implicit-str-concat (находит неявную конкатенацию строк в одной строке)
"N", # pep8-naming (проверка имен переменных, функций, классов на соответствие PEP 8)
"D", # pydocstyle (проверка наличия и стиля докстрингов - ОЧЕНЬ полезно, но может быть ОЧЕНЬ шумно вначале, если докстрингов нет)
"TRY", # flake8-tryceratops (лучшие практики обработки исключений)
"RUF", # Ruff-specific rules (специфичные правила Ruff, часто очень полезные)
]
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in __init__
"T201", # 'print' found
"RUF001",
"RUF002",
"RUF003",
"E501",
"F841",
"TRY003",
"N806",
"D205",
"TRY300",
"TRY400",
"UP006",
"UP035",
"SIM103",
"A005",
"F821",
"F401",
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.isort]
known-first-party = ["src"]
force-sort-within-sections = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
addopts = "-rA --strict-markers --cov=src --cov-report=term-missing --cov-report=html"
[tool.coverage.run]
source = ["src"]
branch = true
omit = [
"src/gui.py",
"src/ui_builder.py", # Пока не решил как тестировать
"src/__init__.py",
"src/types.py", # Нечего покрывать
]
[tool.coverage.report]
fail_under = 50
show_missing = true
skip_covered = true
[tool.coverage.html]
directory = "reports/coverage_rep"
[tool.mypy]
python_version = "3.9"
files = ["src"]
ignore_missing_imports = true
check_untyped_defs = true
disallow_untyped_defs = false
# Позже
# warn_return_any = true
# warn_unused_ignores = true
# strict = true