The previous commit touches tools/ci/check_type_comments.py, which brings the
file into ruff's scope for the first time in a while and surfaces two
pre-existing findings:
A004 Import `exit` is shadowing a Python builtin
F401 `typing.List` imported but unused
Import sys and call sys.exit() rather than shadowing the builtin, which is
also how master writes this file. List is used, but only inside `# type:`
comments that ruff cannot see, so mark the import instead of dropping it:
check_type_comments.py is not on tools/ci/mypy_ignore_list.txt, so mypy checks
it under disallow_untyped_defs and the name has to resolve.
No behaviour change. Verified with the pinned ruff 0.9.7 (check and
format --check) and with mypy 1.19.1, and both exit paths of the script still
behave as before.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>