Skip to content

Commit 60b7ed6

Browse files
committed
fix lint
1 parent 103be84 commit 60b7ed6

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/reactpy/utils.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,16 @@ def string_to_reactpy(
119119
),
120120
)
121121
except etree.XMLSyntaxError as e:
122-
if strict:
123-
msg = (
124-
"An error has occurred while parsing the HTML.\n\n"
125-
"This HTML may be malformatted, or may not perfectly adhere to HTML5.\n"
126-
"If you believe the exception above was due to something intentional, you "
127-
"can disable the strict parameter on string_to_reactpy().\n"
128-
"Otherwise, repair your broken HTML and try again."
129-
)
130-
raise HTMLParseError(msg) from e
131-
else:
132-
return _etree_to_vdom(root_node, transforms, intercept_links)
122+
msg = (
123+
"An error has occurred while parsing the HTML.\n\n"
124+
"This HTML may be malformatted, or may not perfectly adhere to HTML5.\n"
125+
"If you believe the exception above was due to something intentional, you "
126+
"can disable the strict parameter on string_to_reactpy().\n"
127+
"Otherwise, repair your broken HTML and try again."
128+
)
129+
raise HTMLParseError(msg) from e
130+
131+
return _etree_to_vdom(root_node, transforms, intercept_links)
133132

134133

135134
class HTMLParseError(etree.LxmlSyntaxError): # type: ignore[misc]

0 commit comments

Comments
 (0)