Refactor code style and improve documentation
- Standardized string quotes to single quotes across all files. - Added docstrings to several functions and classes for better clarity. - Updated mypy configuration in pyproject.toml for enhanced type checking. - Ignored specific linting rules for test files in ruff configuration. - Improved error messages in exception handling for better user feedback. - Cleaned up code formatting and structure for consistency.
This commit is contained in:
+9
-1
@@ -47,6 +47,9 @@ indent-style = "space"
|
||||
select = ["E", "F", "I", "UP", "B", "Q", "ERA", "D", "SIM", "ARG", "RUF", "C4", "RET", "ASYNC", "PERF", "PL"]
|
||||
ignore = ["D100", "RUF002", "D107", "RUF001", "D104", "D203", "D213", "ARG001"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/**/*.py" = ["D"]
|
||||
|
||||
[tool.ruff.lint.flake8-quotes]
|
||||
inline-quotes = "single"
|
||||
multiline-quotes = "double"
|
||||
@@ -55,11 +58,16 @@ avoid-escape = true
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.13"
|
||||
python_version = "3.12"
|
||||
strict = true
|
||||
warn_unused_ignores = true
|
||||
warn_redundant_casts = true
|
||||
warn_unreachable = true
|
||||
show_error_codes = true
|
||||
pretty = true
|
||||
explicit_package_bases = true
|
||||
files = ["src", "tests", "main.py"]
|
||||
mypy_path = "$MYPY_CONFIG_FILE_DIR/src:$MYPY_CONFIG_FILE_DIR/stubs"
|
||||
|
||||
[tool.deptry.package_module_name_map]
|
||||
"yt-dlp" = "yt_dlp"
|
||||
|
||||
Reference in New Issue
Block a user