mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +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
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user