@@ -209,7 +209,7 @@ def mainLoop(self):
209
209
currentNodeNamespace == defaultNamespace or
210
210
(self .isMathMLTextIntegrationPoint (currentNode ) and
211
211
((type == StartTagToken and
212
- token ["name" ] not in frozenset ([ "mglyph" , "malignmark" ] )) or
212
+ token ["name" ] not in ( "mglyph" , "malignmark" )) or
213
213
type in (CharactersToken , SpaceCharactersToken ))) or
214
214
(currentNodeNamespace == namespaces ["mathml" ] and
215
215
currentNodeName == "annotation-xml" and
@@ -1301,11 +1301,11 @@ def endTagBody(self, token):
1301
1301
return
1302
1302
elif self .tree .openElements [- 1 ].name != "body" :
1303
1303
for node in self .tree .openElements [2 :]:
1304
- if node .name not in frozenset ( ("dd" , "dt" , "li" , "optgroup" ,
1305
- "option" , "p" , "rp" , "rt" ,
1306
- "tbody" , "td" , "tfoot" ,
1307
- "th" , "thead" , "tr" , "body" ,
1308
- "html" ) ):
1304
+ if node .name not in ("dd" , "dt" , "li" , "optgroup" ,
1305
+ "option" , "p" , "rp" , "rt" ,
1306
+ "tbody" , "td" , "tfoot" ,
1307
+ "th" , "thead" , "tr" , "body" ,
1308
+ "html" ):
1309
1309
# Not sure this is the correct name for the parse error
1310
1310
self .parser .parseError (
1311
1311
"expected-one-end-tag-but-got-another" ,
@@ -1517,7 +1517,7 @@ def endTagFormatting(self, token):
1517
1517
if lastNode .parent :
1518
1518
lastNode .parent .removeChild (lastNode )
1519
1519
1520
- if commonAncestor .name in frozenset (( "table" , "tbody" , "tfoot" , "thead" , "tr" ) ):
1520
+ if commonAncestor .name in ( "table" , "tbody" , "tfoot" , "thead" , "tr" ):
1521
1521
parent , insertBefore = self .tree .getTableMisnestedNodePosition ()
1522
1522
parent .insertBefore (lastNode , insertBefore )
1523
1523
else :
0 commit comments