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 ,
@@ -434,7 +435,7 @@ def getPhases(debug):
434
435
def log (function ):
435
436
"""Logger that records which phase processes each token"""
436
437
type_names = dict ((value , key ) for key , value in
437
- constants . tokenTypes .items ())
438
+ tokenTypes .items ())
438
439
439
440
def wrapped (self , * args , ** kwargs ):
440
441
if function .__name__ .startswith ("process" ) and len (args ) > 0 :
@@ -443,7 +444,7 @@ def wrapped(self, *args, **kwargs):
443
444
info = {"type" : type_names [token ['type' ]]}
444
445
except :
445
446
raise
446
- if token ['type' ] in constants . tagTokenTypes :
447
+ if token ['type' ] in tagTokenTypes :
447
448
info ["name" ] = token ['name' ]
448
449
449
450
self .parser .log .append ((self .parser .tokenizer .state .__name__ ,
0 commit comments