ruff: Fix UP007 Use X | Y for type annotations.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-07-11 17:30:23 -07:00
committed by Tim Abbott
parent e08a24e47f
commit 531b34cb4c
355 changed files with 2759 additions and 3029 deletions

View File

@@ -1,6 +1,6 @@
# Documented in https://zulip.readthedocs.io/en/latest/subsystems/queuing.html
import logging
from typing import Any, Optional
from typing import Any
from django.conf import settings
from typing_extensions import override
@@ -29,7 +29,7 @@ class PushNotificationsWorker(QueueProcessingWorker):
self,
threaded: bool = False,
disable_timeout: bool = False,
worker_num: Optional[int] = None,
worker_num: int | None = None,
) -> None:
if settings.MOBILE_NOTIFICATIONS_SHARDS > 1 and worker_num is not None: # nocoverage
self.queue_name = self.queue_name + f"_shard{worker_num}"