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,5 +1,5 @@
import re
from typing import List, Match, Tuple
from typing import Match
from bs4 import BeautifulSoup
@@ -245,7 +245,7 @@ def is_capitalized(safe_text: str) -> bool:
return not any(DISALLOWED_REGEX.search(sentence.strip()) for sentence in sentences)
def check_banned_words(text: str) -> List[str]:
def check_banned_words(text: str) -> list[str]:
lower_cased_text = text.lower()
errors = []
for word, reason in BANNED_WORDS.items():
@@ -266,7 +266,7 @@ def check_banned_words(text: str) -> List[str]:
return errors
def check_capitalization(strings: List[str]) -> Tuple[List[str], List[str], List[str]]:
def check_capitalization(strings: list[str]) -> tuple[list[str], list[str], list[str]]:
errors = []
ignored = []
banned_word_errors = []