Skip to content

Commit fec6378

Browse files
committed
allow any number of whitespaces
1 parent 9ab8831 commit fec6378

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/board_stubs/build_board_specific_stubs/board_stub_builder.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ def get_board_pins(pin_filename):
1717
if line.strip()[0:2] == "//":
1818
continue
1919

20-
search = re.search(r"MP_ROM_QSTR\(MP_QSTR_(.*?)\), MP_ROM_PTR", line)
20+
# (\s*) means any amount of whitespaces (no whitespaces allowed too)
21+
# related issue: https://github.com/adafruit/circuitpython/issues/9407
22+
23+
search = re.search(r"MP_ROM_QSTR\(MP_QSTR_(.*?)\),(\s*)MP_ROM_PTR", line)
2124
if search is None:
22-
search = re.search(r"MP_OBJ_NEW_QSTR\(MP_QSTR_(.*?)\), MP_ROM_PTR", line)
25+
search = re.search(r"MP_OBJ_NEW_QSTR\(MP_QSTR_(.*?)\),(\s*)MP_ROM_PTR", line)
2326
if search is None:
2427
continue
2528

0 commit comments

Comments
 (0)