File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ def get_irq_list(device):
43
43
irqs = {v ["position" ]: v ["name" ] for v in device .get_driver ("core" )["vector" ]}
44
44
irqs = [v for v in irqs .values () if v .startswith ("DMA" ) and v [3 ].isdigit () and not "DMA2D" in v ]
45
45
46
- instance_pattern = re .compile ("(DMA\d_(Ch|Channel|Stream)\d(_\d)*)" )
47
- channel_pattern = re .compile ("DMA(?P<instance>\d)_(Ch|Channel|Stream)(?P<channels>(\d(_\d)*))" )
46
+ instance_pattern = re .compile (r "(DMA\d_(Ch|Channel|Stream)\d(_\d)*)" )
47
+ channel_pattern = re .compile (r "DMA(?P<instance>\d)_(Ch|Channel|Stream)(?P<channels>(\d(_\d)*))" )
48
48
irq_list = []
49
49
for irq in irqs :
50
50
instances = []
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import re
17
17
global_properties = {}
18
18
19
19
def get_shared_irqs (device ):
20
- irq_re = re .compile ("I2C\d(_\d)+" )
20
+ irq_re = re .compile (r "I2C\d(_\d)+" )
21
21
shared_irqs = [v ["name" ] for v in device .get_driver ("core" )["vector" ]]
22
22
shared_irqs = [v for v in shared_irqs if irq_re .fullmatch (v )]
23
23
shared_irq_map = {}
Original file line number Diff line number Diff line change 34
34
# switch to the next line
35
35
input = input [input .find ("\n " ) + 1 :]
36
36
37
- result = re .match ("^(\d+) (\d+)\n " , input )
37
+ result = re .match (r "^(\d+) (\d+)\n" , input )
38
38
if not result :
39
39
print ("bad format!" )
40
40
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def read_font_file(filename):
135
135
lines = open (filename ).readlines ()
136
136
for line_number , line in enumerate (lines ):
137
137
if char_mode :
138
- result = re .match ("^\[([ #]+)\]\n " , line )
138
+ result = re .match (r "^\[([ #]+)\]\n" , line )
139
139
if not result :
140
140
raise ParseException ("Illegal Format in: %s" % line [:- 1 ], line_number )
141
141
@@ -165,7 +165,7 @@ def read_font_file(filename):
165
165
if char_line_count == 0 :
166
166
char_mode = False
167
167
elif line [0 ] == '#' :
168
- result = re .match ("^#(\w+)[ \t ]+:[ \t ]+(.*)\n " , line )
168
+ result = re .match (r "^#(\w+)[ \t]+:[ \t]+(.*)\n" , line )
169
169
if not result :
170
170
print ("Error in: " , line )
171
171
exit (1 )
@@ -184,7 +184,7 @@ def read_font_file(filename):
184
184
elif key == "vspace" :
185
185
font .vspace = int (value )
186
186
elif key == "char" :
187
- charMatch = re .match ("^(\d+)([ \t ]*.*)" , value )
187
+ charMatch = re .match (r "^(\d+)([ \t]*.*)" , value )
188
188
if not charMatch :
189
189
raise ParseException ("Illegal Format in: %s" % line [:- 1 ], line_number )
190
190
number = int (charMatch .group (1 ))
You can’t perform that action at this time.
0 commit comments