mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-28 01:26:14 +00:00
Chore: Drop Python 3.9 support (#7774)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import enum
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import Optional
|
||||
from typing import Union
|
||||
|
||||
from asgiref.sync import async_to_sync
|
||||
from channels.layers import get_channel_layer
|
||||
@@ -23,9 +21,9 @@ class ProgressManager:
|
||||
of the open/close of the layer to ensure messages go out and everything is cleaned up
|
||||
"""
|
||||
|
||||
def __init__(self, filename: str, task_id: Optional[str] = None) -> None:
|
||||
def __init__(self, filename: str, task_id: str | None = None) -> None:
|
||||
self.filename = filename
|
||||
self._channel: Optional[RedisPubSubChannelLayer] = None
|
||||
self._channel: RedisPubSubChannelLayer | None = None
|
||||
self.task_id = task_id
|
||||
|
||||
def __enter__(self):
|
||||
@@ -57,7 +55,7 @@ class ProgressManager:
|
||||
message: str,
|
||||
current_progress: int,
|
||||
max_progress: int,
|
||||
extra_args: Optional[dict[str, Union[str, int, None]]] = None,
|
||||
extra_args: dict[str, str | int | None] | None = None,
|
||||
) -> None:
|
||||
# Ensure the layer is open
|
||||
self.open()
|
||||
|
Reference in New Issue
Block a user