Обновить настройки инструмента Ruff и MyPy для улучшения линтинга и проверки типов
This commit is contained in:
+14
-12
@@ -35,29 +35,31 @@ where = ["src"]
|
|||||||
yt_shorts_downloader = ["py.typed"]
|
yt_shorts_downloader = ["py.typed"]
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 100
|
line-length = 160
|
||||||
src = ["src", "tests"]
|
|
||||||
target-version = "py312"
|
target-version = "py312"
|
||||||
|
src = ["src", "tests"]
|
||||||
|
|
||||||
[tool.ruff.format]
|
[tool.ruff.format]
|
||||||
quote-style = "double"
|
quote-style = "single"
|
||||||
indent-style = "space"
|
indent-style = "space"
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["B", "E", "F", "I", "PL", "RUF", "SIM", "UP"]
|
select = ["E", "F", "I", "UP", "B", "Q", "ERA", "D", "SIM", "ARG", "RUF", "C4", "RET", "ASYNC", "PERF", "PL"]
|
||||||
ignore = ["PLR0913", "PLR2004"]
|
ignore = ["D100", "RUF002", "D107", "RUF001", "D104", "D203", "D213", "ARG001"]
|
||||||
|
|
||||||
|
[tool.ruff.lint.flake8-quotes]
|
||||||
|
inline-quotes = "single"
|
||||||
|
multiline-quotes = "double"
|
||||||
|
docstring-quotes = "double"
|
||||||
|
avoid-escape = true
|
||||||
|
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.12"
|
python_version = "3.13"
|
||||||
strict = true
|
strict = true
|
||||||
|
warn_unused_ignores = true
|
||||||
warn_redundant_casts = true
|
warn_redundant_casts = true
|
||||||
warn_unreachable = true
|
warn_unreachable = true
|
||||||
warn_unused_ignores = true
|
|
||||||
show_error_codes = true
|
|
||||||
pretty = true
|
|
||||||
explicit_package_bases = true
|
|
||||||
files = ["src", "tests"]
|
|
||||||
mypy_path = "$MYPY_CONFIG_FILE_DIR/src:$MYPY_CONFIG_FILE_DIR/stubs"
|
|
||||||
|
|
||||||
[tool.deptry.package_module_name_map]
|
[tool.deptry.package_module_name_map]
|
||||||
"yt-dlp" = "yt_dlp"
|
"yt-dlp" = "yt_dlp"
|
||||||
|
|||||||
Reference in New Issue
Block a user