mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
ruff: Fix UP006 Use list instead of List for type annotation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
c2214b3904
commit
e08a24e47f
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user