Chore: Drop Python 3.9 support (#7774)

This commit is contained in:
Trenton H
2024-09-26 12:22:24 -07:00
committed by GitHub
parent 5e687d9a93
commit e6f59472e4
44 changed files with 970 additions and 1066 deletions

View File

@@ -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()