ruff: Fix UP006 Use list instead of List for type annotation.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-07-11 17:30:17 -07:00
committed by Tim Abbott
parent c2214b3904
commit e08a24e47f
457 changed files with 3588 additions and 3857 deletions

View File

@@ -1,6 +1,6 @@
# Webhooks for external integrations.
import time
from typing import Dict, Optional, Sequence, Tuple
from typing import Optional, Sequence
from django.http import HttpRequest, HttpResponse
@@ -65,7 +65,7 @@ def api_stripe_webhook(
return json_success(request)
def topic_and_body(payload: WildValue) -> Tuple[str, str]:
def topic_and_body(payload: WildValue) -> tuple[str, str]:
event_type = payload["type"].tame(
check_string
) # invoice.created, customer.subscription.created, etc
@@ -318,7 +318,7 @@ def amount_string(amount: int, currency: str) -> str:
def linkified_id(object_id: str, lower: bool = False) -> str:
names_and_urls: Dict[str, Tuple[str, Optional[str]]] = {
names_and_urls: dict[str, tuple[str, Optional[str]]] = {
# Core resources
"ch": ("Charge", "charges"),
"cus": ("Customer", "customers"),