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

@@ -4,7 +4,7 @@ import configparser
import os
import re
import sys
from typing import Any, Optional
from typing import Any
import requests
@@ -39,7 +39,7 @@ def is_issue(item: dict[str, Any]) -> bool:
return "issues" in item["html_url"]
def get_next_page_url(link_header: str) -> Optional[str]:
def get_next_page_url(link_header: str) -> str | None:
matches = re.findall(r"\<(\S+)\>; rel=\"next\"", link_header)
try:
return matches[0]
@@ -63,7 +63,7 @@ def check_issue_labels() -> None:
)
sys.exit(1)
next_page_url: Optional[str] = "https://api.github.com/repos/zulip/zulip/issues"
next_page_url: str | None = "https://api.github.com/repos/zulip/zulip/issues"
unlabeled_issue_urls: list[str] = []
while next_page_url:
try: