Skip to content

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

@dhalbert

Description

@dhalbert

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions