|
298 | 298 | "xmlns": "http://www.w3.org/2000/xmlns/" |
299 | 299 | } |
300 | 300 |
|
301 | | -scopingElements = frozenset(( |
| 301 | +scopingElements = frozenset([ |
302 | 302 | (namespaces["html"], "applet"), |
303 | 303 | (namespaces["html"], "caption"), |
304 | 304 | (namespaces["html"], "html"), |
|
316 | 316 | (namespaces["svg"], "foreignObject"), |
317 | 317 | (namespaces["svg"], "desc"), |
318 | 318 | (namespaces["svg"], "title"), |
319 | | -)) |
| 319 | +]) |
320 | 320 |
|
321 | | -formattingElements = frozenset(( |
| 321 | +formattingElements = frozenset([ |
322 | 322 | (namespaces["html"], "a"), |
323 | 323 | (namespaces["html"], "b"), |
324 | 324 | (namespaces["html"], "big"), |
|
333 | 333 | (namespaces["html"], "strong"), |
334 | 334 | (namespaces["html"], "tt"), |
335 | 335 | (namespaces["html"], "u") |
336 | | -)) |
| 336 | +]) |
337 | 337 |
|
338 | | -specialElements = frozenset(( |
| 338 | +specialElements = frozenset([ |
339 | 339 | (namespaces["html"], "address"), |
340 | 340 | (namespaces["html"], "applet"), |
341 | 341 | (namespaces["html"], "area"), |
|
416 | 416 | (namespaces["html"], "wbr"), |
417 | 417 | (namespaces["html"], "xmp"), |
418 | 418 | (namespaces["svg"], "foreignObject") |
419 | | -)) |
| 419 | +]) |
420 | 420 |
|
421 | | -htmlIntegrationPointElements = frozenset(( |
| 421 | +htmlIntegrationPointElements = frozenset([ |
422 | 422 | (namespaces["mathml"], "annotaion-xml"), |
423 | 423 | (namespaces["svg"], "foreignObject"), |
424 | 424 | (namespaces["svg"], "desc"), |
425 | 425 | (namespaces["svg"], "title") |
426 | | -)) |
| 426 | +]) |
427 | 427 |
|
428 | | -mathmlTextIntegrationPointElements = frozenset(( |
| 428 | +mathmlTextIntegrationPointElements = frozenset([ |
429 | 429 | (namespaces["mathml"], "mi"), |
430 | 430 | (namespaces["mathml"], "mo"), |
431 | 431 | (namespaces["mathml"], "mn"), |
432 | 432 | (namespaces["mathml"], "ms"), |
433 | 433 | (namespaces["mathml"], "mtext") |
434 | | -)) |
| 434 | +]) |
435 | 435 |
|
436 | 436 | adjustForeignAttributes = { |
437 | 437 | "xlink:actuate": ("xlink", "actuate", namespaces["xlink"]), |
|
451 | 451 | unadjustForeignAttributes = dict([((ns, local), qname) for qname, (prefix, local, ns) in |
452 | 452 | adjustForeignAttributes.items()]) |
453 | 453 |
|
454 | | -spaceCharacters = frozenset(( |
| 454 | +spaceCharacters = frozenset([ |
455 | 455 | "\t", |
456 | 456 | "\n", |
457 | 457 | "\u000C", |
458 | 458 | " ", |
459 | 459 | "\r" |
460 | | -)) |
| 460 | +]) |
461 | 461 |
|
462 | | -tableInsertModeElements = frozenset(( |
| 462 | +tableInsertModeElements = frozenset([ |
463 | 463 | "table", |
464 | 464 | "tbody", |
465 | 465 | "tfoot", |
466 | 466 | "thead", |
467 | 467 | "tr" |
468 | | -)) |
| 468 | +]) |
469 | 469 |
|
470 | 470 | asciiLowercase = frozenset(string.ascii_lowercase) |
471 | 471 | asciiUppercase = frozenset(string.ascii_uppercase) |
|
486 | 486 | "h6" |
487 | 487 | ) |
488 | 488 |
|
489 | | -voidElements = frozenset(( |
| 489 | +voidElements = frozenset([ |
490 | 490 | "base", |
491 | 491 | "command", |
492 | 492 | "event-source", |
|
502 | 502 | "input", |
503 | 503 | "source", |
504 | 504 | "track" |
505 | | -)) |
| 505 | +]) |
506 | 506 |
|
507 | | -cdataElements = frozenset(('title', 'textarea')) |
| 507 | +cdataElements = frozenset(['title', 'textarea']) |
508 | 508 |
|
509 | | -rcdataElements = frozenset(( |
| 509 | +rcdataElements = frozenset([ |
510 | 510 | 'style', |
511 | 511 | 'script', |
512 | 512 | 'xmp', |
513 | 513 | 'iframe', |
514 | 514 | 'noembed', |
515 | 515 | 'noframes', |
516 | 516 | 'noscript' |
517 | | -)) |
| 517 | +]) |
518 | 518 |
|
519 | 519 | booleanAttributes = { |
520 | | - "": frozenset(("irrelevant",)), |
521 | | - "style": frozenset(("scoped",)), |
522 | | - "img": frozenset(("ismap",)), |
523 | | - "audio": frozenset(("autoplay", "controls")), |
524 | | - "video": frozenset(("autoplay", "controls")), |
525 | | - "script": frozenset(("defer", "async")), |
526 | | - "details": frozenset(("open",)), |
527 | | - "datagrid": frozenset(("multiple", "disabled")), |
528 | | - "command": frozenset(("hidden", "disabled", "checked", "default")), |
529 | | - "hr": frozenset(("noshade")), |
530 | | - "menu": frozenset(("autosubmit",)), |
531 | | - "fieldset": frozenset(("disabled", "readonly")), |
532 | | - "option": frozenset(("disabled", "readonly", "selected")), |
533 | | - "optgroup": frozenset(("disabled", "readonly")), |
534 | | - "button": frozenset(("disabled", "autofocus")), |
535 | | - "input": frozenset(("disabled", "readonly", "required", "autofocus", "checked", "ismap")), |
536 | | - "select": frozenset(("disabled", "readonly", "autofocus", "multiple")), |
537 | | - "output": frozenset(("disabled", "readonly")), |
| 520 | + "": frozenset(["irrelevant"]), |
| 521 | + "style": frozenset(["scoped"]), |
| 522 | + "img": frozenset(["ismap"]), |
| 523 | + "audio": frozenset(["autoplay", "controls"]), |
| 524 | + "video": frozenset(["autoplay", "controls"]), |
| 525 | + "script": frozenset(["defer", "async"]), |
| 526 | + "details": frozenset(["open"]), |
| 527 | + "datagrid": frozenset(["multiple", "disabled"]), |
| 528 | + "command": frozenset(["hidden", "disabled", "checked", "default"]), |
| 529 | + "hr": frozenset(["noshade"]), |
| 530 | + "menu": frozenset(["autosubmit"]), |
| 531 | + "fieldset": frozenset(["disabled", "readonly"]), |
| 532 | + "option": frozenset(["disabled", "readonly", "selected"]), |
| 533 | + "optgroup": frozenset(["disabled", "readonly"]), |
| 534 | + "button": frozenset(["disabled", "autofocus"]), |
| 535 | + "input": frozenset(["disabled", "readonly", "required", "autofocus", "checked", "ismap"]), |
| 536 | + "select": frozenset(["disabled", "readonly", "autofocus", "multiple"]), |
| 537 | + "output": frozenset(["disabled", "readonly"]), |
538 | 538 | } |
539 | 539 |
|
540 | 540 | # entitiesWindows1252 has to be _ordered_ and needs to have an index. It |
|
574 | 574 | 376 # 0x9F 0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS |
575 | 575 | ) |
576 | 576 |
|
577 | | -xmlEntities = frozenset(('lt;', 'gt;', 'amp;', 'apos;', 'quot;')) |
| 577 | +xmlEntities = frozenset(['lt;', 'gt;', 'amp;', 'apos;', 'quot;']) |
578 | 578 |
|
579 | 579 | entities = { |
580 | 580 | "AElig": "\xc6", |
|
3088 | 3088 | "ParseError": 7 |
3089 | 3089 | } |
3090 | 3090 |
|
3091 | | -tagTokenTypes = frozenset((tokenTypes["StartTag"], tokenTypes["EndTag"], |
3092 | | - tokenTypes["EmptyTag"])) |
| 3091 | +tagTokenTypes = frozenset([tokenTypes["StartTag"], tokenTypes["EndTag"], |
| 3092 | + tokenTypes["EmptyTag"]]) |
3093 | 3093 |
|
3094 | 3094 |
|
3095 | 3095 | prefixes = dict([(v, k) for k, v in namespaces.items()]) |
|
0 commit comments