@@ -313,10 +313,10 @@ def __init__(self, _ucd_dir, _header_file, _impl_file):
313313 self .header = open (_header_file , 'w' , encoding = 'utf-8' , newline = '\u000A ' )
314314 self .impl = open (_impl_file , 'w' , encoding = 'utf-8' , newline = '\u000A ' )
315315
316- self .singleValueRE = re .compile ('([0-9A-F]+)\s*;\s*(\w+)\s*#\s*(.*)$' )
317- self .rangeValueRE = re .compile ('([0-9A-F]+)\.\.([0-9A-F]+)\s*;\s*(\w+)\s*#\s*(.*)$' )
318- self .singleValueMultiRE = re .compile ('([0-9A-F]+)\s*;\s*([\w\s]+)#\s*(.*)$' )
319- self .rangeValueMultiRE = re .compile ('([0-9A-F]+)\.\.([0-9A-F]+)\s*;\s*([\w\s]+)#\s*(.*)$' )
316+ self .singleValueRE = re .compile (r '([0-9A-F]+)\s*;\s*(\w+)\s*#\s*(.*)$' )
317+ self .rangeValueRE = re .compile (r '([0-9A-F]+)\.\.([0-9A-F]+)\s*;\s*(\w+)\s*#\s*(.*)$' )
318+ self .singleValueMultiRE = re .compile (r '([0-9A-F]+)\s*;\s*([\w\s]+)#\s*(.*)$' )
319+ self .rangeValueMultiRE = re .compile (r '([0-9A-F]+)\.\.([0-9A-F]+)\s*;\s*([\w\s]+)#\s*(.*)$' )
320320
321321 self .general_category_map = dict ()
322322 self .general_category = list ()
@@ -393,8 +393,8 @@ def load_property_value_aliases(self): # {{{
393393
394394 with uopen (self .ucd_dir + '/' + PropertyValueAliases_fname ) as f :
395395 # gc ; C ; Other # Cc | Cf | Cn | Co | Cs
396- headerRE = re .compile ('^#\s*(\w+) \((\w+)\)$' )
397- lineRE = re .compile ('^(\w+)\s*;\s*([a-zA-Z0-9_\.]+)\s*;\s*([a-zA-Z0-9_]+).*$' )
396+ headerRE = re .compile (r '^#\s*(\w+) \((\w+)\)$' )
397+ lineRE = re .compile (r '^(\w+)\s*;\s*([a-zA-Z0-9_\.]+)\s*;\s*([a-zA-Z0-9_]+).*$' )
398398 property_values = dict ()
399399
400400 while True :
@@ -514,7 +514,7 @@ def write_properties(self): # {{{
514514
515515 def load_general_category (self ): # {{{
516516 with uopen (self .ucd_dir + DerivedGeneralCategory_fname ) as f :
517- headerRE = re .compile ('^#\s*General_Category=(\w+)$' )
517+ headerRE = re .compile (r '^#\s*General_Category=(\w+)$' )
518518 property_values = self .property_values ['General_Category' ]
519519 cat_name = ''
520520 cats_grouped = dict ()
@@ -646,7 +646,7 @@ def load_generic_properties(self, filename): # {{{
646646
647647 def load_properties (self , filename : str , prop_key : str ): # {{{
648648 with uopen (filename ) as f :
649- headerRE = re .compile ('^#\s*{}:\s*(\w+)$' .format (prop_key ))
649+ headerRE = re .compile (r '^#\s*{}:\s*(\w+)$' .format (prop_key ))
650650
651651 # collect
652652 props_name = ''
@@ -767,7 +767,7 @@ def write_scripts(self): # {{{
767767 def load_blocks (self ): # {{{
768768 filename = self .ucd_dir + '/' + Blocks_fname
769769 with uopen (filename ) as f :
770- line_regex = re .compile ('^([0-9A-Fa-f]+)\.\.([0-9A-Fa-f]+);\s*(.*)$' )
770+ line_regex = re .compile (r '^([0-9A-Fa-f]+)\.\.([0-9A-Fa-f]+);\s*(.*)$' )
771771 blocks = list ()
772772 while True :
773773 line = f .readline ()
0 commit comments