mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
lint: Migrate typing.Text check to semgrep.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
e5779c1ca0
commit
d0d8c358b3
@@ -1,4 +1,4 @@
|
||||
from typing import Callable, List, Optional, Text
|
||||
from typing import Callable, List, Optional
|
||||
|
||||
|
||||
class FormattedException(Exception):
|
||||
@@ -306,7 +306,7 @@ OPTIONAL_CLOSING_TAGS = [
|
||||
'stop',
|
||||
]
|
||||
|
||||
def is_self_closing_html_tag(s: Text, tag: Text) -> bool:
|
||||
def is_self_closing_html_tag(s: str, tag: str) -> bool:
|
||||
if s.endswith('/>'):
|
||||
if tag in OPTIONAL_CLOSING_TAGS:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user