10
10
from .treebuilders ._base import Marker
11
11
12
12
from . import utils
13
- from . import constants
14
- from .constants import spaceCharacters , asciiUpper2Lower
15
- from .constants import specialElements
16
- from .constants import headingElements
17
- from .constants import cdataElements , rcdataElements
18
- from .constants import tokenTypes , ReparseException , namespaces
19
- from .constants import htmlIntegrationPointElements , mathmlTextIntegrationPointElements
20
- from .constants import adjustForeignAttributes as adjustForeignAttributesMap
21
- from .constants import E
13
+ from .constants import (
14
+ spaceCharacters , asciiUpper2Lower ,
15
+ specialElements , headingElements , cdataElements , rcdataElements ,
16
+ tokenTypes , tagTokenTypes ,
17
+ namespaces ,
18
+ htmlIntegrationPointElements , mathmlTextIntegrationPointElements ,
19
+ adjustForeignAttributes as adjustForeignAttributesMap ,
20
+ E ,
21
+ ReparseException
22
+ )
22
23
23
24
24
25
def parse (doc , treebuilder = "etree" , encoding = None ,
@@ -422,7 +423,7 @@ def getPhases(debug):
422
423
def log (function ):
423
424
"""Logger that records which phase processes each token"""
424
425
type_names = dict ((value , key ) for key , value in
425
- constants . tokenTypes .items ())
426
+ tokenTypes .items ())
426
427
427
428
def wrapped (self , * args , ** kwargs ):
428
429
if function .__name__ .startswith ("process" ) and len (args ) > 0 :
@@ -431,7 +432,7 @@ def wrapped(self, *args, **kwargs):
431
432
info = {"type" : type_names [token ['type' ]]}
432
433
except :
433
434
raise
434
- if token ['type' ] in constants . tagTokenTypes :
435
+ if token ['type' ] in tagTokenTypes :
435
436
info ["name" ] = token ['name' ]
436
437
437
438
self .parser .log .append ((self .parser .tokenizer .state .__name__ ,
0 commit comments