1717
1818letter = " | " .join ([baseChar , ideographic ])
1919
20- #Without the
21- name = " | " .join ([letter , digit , "." , "-" , "_" , combiningCharacter ,
20+ #Without the
21+ name = " | " .join ([letter , digit , "." , "-" , "_" , combiningCharacter ,
2222 extender ])
2323nameFirst = " | " .join ([letter , "_" ])
2424
@@ -40,7 +40,7 @@ def charStringToList(chars):
4040 break
4141 if not foundMatch :
4242 assert len (item ) == 1
43-
43+
4444 rv .append ([ord (item )] * 2 )
4545 rv = normaliseCharList (rv )
4646 return rv
@@ -62,7 +62,7 @@ def normaliseCharList(charList):
6262
6363#We don't really support characters above the BMP :(
6464max_unicode = int ("FFFF" , 16 )
65-
65+
6666def missingRanges (charList ):
6767 rv = []
6868 if charList [0 ] != 0 :
@@ -103,8 +103,8 @@ def escapeRegexp(string):
103103
104104class InfosetFilter (object ):
105105 replacementRegexp = re .compile (r"U[\dA-F]{5,5}" )
106- def __init__ (self , replaceChars = None ,
107- dropXmlnsLocalName = False ,
106+ def __init__ (self , replaceChars = None ,
107+ dropXmlnsLocalName = False ,
108108 dropXmlnsAttrNs = False ,
109109 preventDoubleDashComments = False ,
110110 preventDashAtCommentEnd = False ,
@@ -124,7 +124,7 @@ def coerceAttribute(self, name, namespace=None):
124124 if self .dropXmlnsLocalName and name .startswith ("xmlns:" ):
125125 warnings .warn ("Attributes cannot begin with xmlns" , DataLossWarning )
126126 return None
127- elif (self .dropXmlnsAttrNs and
127+ elif (self .dropXmlnsAttrNs and
128128 namespace == "http://www.w3.org/2000/xmlns/" ):
129129 warnings .warn ("Attributes cannot be in the xml namespace" , DataLossWarning )
130130 return None
@@ -140,7 +140,7 @@ def coerceComment(self, data):
140140 warnings .warn ("Comments cannot contain adjacent dashes" , DataLossWarning )
141141 data = data .replace ("--" , "- -" )
142142 return data
143-
143+
144144 def coerceCharacters (self , data ):
145145 if self .replaceFormFeedCharacters :
146146 for i in range (data .count ("\x0C " )):
@@ -166,7 +166,7 @@ def toXmlName(self, name):
166166 replacement = self .getReplacementCharacter (char )
167167 nameRestOutput = nameRestOutput .replace (char , replacement )
168168 return nameFirstOutput + nameRestOutput
169-
169+
170170 def getReplacementCharacter (self , char ):
171171 if char in self .replaceCache :
172172 replacement = self .replaceCache [char ]
0 commit comments