mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
ruff: Fix RUF021 Parenthesize when chaining and and or together.
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 865febb307)
This commit is contained in:
committed by
Tim Abbott
parent
9ea290d5ae
commit
13a037a799
@@ -674,7 +674,7 @@ def get_html_tag(text: str, i: int) -> str:
|
||||
quote_count = 0
|
||||
end = i + 1
|
||||
unclosed_end = 0
|
||||
while end < len(text) and (text[end] != ">" or quote_count % 2 != 0 and text[end] != "<"):
|
||||
while end < len(text) and (text[end] != ">" or (quote_count % 2 != 0 and text[end] != "<")):
|
||||
if text[end] == '"':
|
||||
quote_count += 1
|
||||
if not unclosed_end and text[end] == "<":
|
||||
|
||||
Reference in New Issue
Block a user