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 @@
import re
from datetime import datetime, timezone
from typing import Callable, Optional
from typing import Callable
from django.http import HttpRequest, HttpResponse
@@ -908,7 +908,7 @@ def api_github_webhook(
user_profile: UserProfile,
*,
payload: JsonBodyPayload[WildValue],
branches: Optional[str] = None,
branches: str | None = None,
user_specified_topic: OptionalUserSpecifiedTopicStr = None,
) -> HttpResponse:
"""
@@ -943,8 +943,8 @@ def api_github_webhook(
def get_zulip_event_name(
header_event: str,
payload: WildValue,
branches: Optional[str],
) -> Optional[str]:
branches: str | None,
) -> str | None:
"""
Usually, we return an event name that is a key in EVENT_FUNCTION_MAPPER.