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
+2
-2
@@ -1,10 +1,10 @@
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.syndication.views import Feed
|
||||
from django.db.models import Case, When, PositiveSmallIntegerField, F, QuerySet
|
||||
from django.db.models import Case, F, PositiveSmallIntegerField, QuerySet, When
|
||||
from django.http import HttpRequest
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
from comic.models import ComicBook, UserMisc, Directory
|
||||
from comic.models import ComicBook, Directory, UserMisc
|
||||
|
||||
|
||||
class RecentComicsAPI(Feed):
|
||||
|
||||
Reference in new issue
Block a user