mirror of
https://github.com/ajurna/cbwebreader.git
synced 2026-11-02 10:36:55 +00:00
**Replace Flake8 with Ruff, refactor type hints, and enhance archive processing logic**
- Removed `flake8` and `flake8-annotations` from dependencies, replaced by `ruff` for linting. - Introduced cleaner type hinting and modern Python annotations (PEP 604 style) across multiple modules. - Moved archive processing to a dedicated helper (`comic.archives`) for improved maintainability. - Updated and simplified logic for archive file retrieval, directory cleaning, and user access validation. - Improved error handling and added support for user classification restrictions in API responses.
This commit is contained in:
1 parent
147a3a54ef
commit
1148f4072b
13 files changed
+236
-227
No files matched your search
+19
-2
@@ -39,13 +39,30 @@ dependencies = [
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"coverage>=7.13.5",
|
||||
"flake8>=7.3.0",
|
||||
"flake8-annotations>=3.2.0",
|
||||
"ipython>=9.13.0",
|
||||
"mypy>=2",
|
||||
"pre-commit>=4.6",
|
||||
"pylint>=4.0.5",
|
||||
"pylint-django>=2.7.0",
|
||||
"pyopenssl>=26.2.0",
|
||||
"ruff>=0.17.0",
|
||||
"werkzeug>=3.1.8",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py314"
|
||||
line-length = 120
|
||||
extend-exclude = [
|
||||
"*/migrations/*",
|
||||
"cbreader/settings",
|
||||
"frontend",
|
||||
]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "W", "I", "ANN", "B", "C4", "SIM", "UP"]
|
||||
# These were ignored by the previous flake8-annotations setup (ANN001 is the
|
||||
# modern name for the old ANN101).
|
||||
ignore = ["ANN001", "ANN002", "ANN003"]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
combine-as-imports = true
|
||||
Reference in new issue
Block a user