pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

tools/check_board_header.py et al give SyntaxWarnings for invalid escape sequences

Open dhalbert opened this issue 5 months ago • 3 comments

tools/check_board_header.py gives syntax warnings for invalid escape sequences when used with Python 3.12 (at least). The re strings should be raw strings.

example:

/home/halbert/repos/adafruit/pico-sdk/tools/check_board_header.py:223: SyntaxWarning: invalid escape sequence '\s'
  if re.match("^\s*// For board detection", line):
/home/halbert/repos/adafruit/pico-sdk/tools/check_board_header.py:228: SyntaxWarning: invalid escape sequence '\s'
  m = re.match("^\s*// This header may be included by other board headers as \"(.+?)\"", line)

I'll submit a PR for this shortly

dhalbert avatar Jun 17 '25 12:06 dhalbert