mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
ruff: Fix UP007 Use X | Y for type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
e08a24e47f
commit
531b34cb4c
@@ -1,5 +1,3 @@
|
||||
from typing import Optional
|
||||
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from pydantic import Json
|
||||
|
||||
@@ -35,7 +33,7 @@ def get_storage(
|
||||
request: HttpRequest,
|
||||
user_profile: UserProfile,
|
||||
*,
|
||||
keys: Json[Optional[list[str]]] = None,
|
||||
keys: Json[list[str] | None] = None,
|
||||
) -> HttpResponse:
|
||||
if keys is None:
|
||||
keys = get_keys_in_bot_storage(user_profile)
|
||||
@@ -51,7 +49,7 @@ def remove_storage(
|
||||
request: HttpRequest,
|
||||
user_profile: UserProfile,
|
||||
*,
|
||||
keys: Json[Optional[list[str]]] = None,
|
||||
keys: Json[list[str] | None] = None,
|
||||
) -> HttpResponse:
|
||||
if keys is None:
|
||||
keys = get_keys_in_bot_storage(user_profile)
|
||||
|
||||
Reference in New Issue
Block a user