mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +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.conf import settings
|
||||
from django.db.models import F, Sum
|
||||
from django.db.models.functions import Length
|
||||
@@ -18,7 +16,7 @@ def get_bot_storage(bot_profile: UserProfile, key: str) -> str:
|
||||
raise StateError("Key does not exist.")
|
||||
|
||||
|
||||
def get_bot_storage_size(bot_profile: UserProfile, key: Optional[str] = None) -> int:
|
||||
def get_bot_storage_size(bot_profile: UserProfile, key: str | None = None) -> int:
|
||||
if key is None:
|
||||
return (
|
||||
BotStorageData.objects.filter(bot_profile=bot_profile)
|
||||
|
||||
Reference in New Issue
Block a user