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>
check_type_comments.py runs ignore-listed files through a relaxed mypy pass
with --python-version 3.8, which overrides the python_version = 3.9 that
.mypy.ini already sets. mypy dropped 3.8 as a modelling target in 1.17.0 and
now rejects the flag while parsing arguments, before it reads any source:
mypy: error: argument --python-version: Python 3.8 is not supported
(must be 3.9 or higher)
mypy check failed for:
tools/ldgen/ldgen.py
The hook declares mypy without a version, so which mypy is used is decided
when the ci/images pre-commit-idf-v5.5 image is built. That image is based on
Python 3.9, where Requires-Python caps mypy at 1.19.1, and the image
currently in use carries exactly that. Any MR touching a file listed in
tools/ci/mypy_ignore_list.txt therefore fails check_pre_commit
deterministically, whatever the file contains.
Pass 3.9 instead, matching .mypy.ini and the OLDEST_PYTHON_SUPPORTED = (3, 9)
that tools/python_version_checker.py enforces on this branch. This restores
the pairing master and release/v6.0 already have, where the flag mirrors
.mypy.ini at 3.10.
release/v5.4 and release/v5.3 need no equivalent change: their pre-commit
images are based on Python 3.8, where mypy caps at 1.14.1 and the flag is
still accepted.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
- Click-based CLI entry point (console.py) with --port, --baudrate,
--log-dir options and interactive Launch Screen when --port omitted
- Deprecation warning for --output CLI flag
- 'ls' subcommand to list saved capture files
- PyInstaller build scripts (build.sh, build.bat, build_exe.py)
- Convenience run scripts (run.sh, run.bat)
- README rewrite with installation, usage, architecture docs, and
troubleshooting guide
- User guides in English and Chinese
- Remove old single-file ble_log_console.py
- Register new scripts in executable-list.txt