On 11/9/26 9:22 AM, Tom Tromey wrote:
"Oleg" == Oleg Tolmatcev <[email protected]> writes:
Oleg> Several Python scripts contain C-style semicolons, unused imports,
Oleg> equality comparisons with None, and regular expressions with invalid
Oleg> escape sequences. Newer Python versions warn about the latter.
Oleg> Remove the semicolons and unused imports, use raw strings for regular
Oleg> expressions, and compare None by identity. No functional change is
Oleg> intended.
FWIW in gdb we use a few Python checkers (flake8, black, and isort) plus
a pre-commit configuration so that these kinds of errors are generally
caught early.
It wouldn't be hard to adapt the Python bits to the gcc tree, if someone
was so inclined.
I'd love to see some kind of linter/checker for anything that gets
goof'd regularly. So if someone were to take this up for the python
scripts, I'd be supportive.
jeff