Apply the ruff lint (including pyupgrade) and format fixes for the
Python 3.11 target in the following areas:
- tools (idf_py_actions, install_util, test_bsasm, test_idf_diag,
test_idf_py, test_idf_size)
- tools/ci
- tools/test_apps
- tools/test_build_system
- tools/ldgen
Findings that are not auto-fixable (long lines, a shadowed builtin,
type comparisons) are fixed by hand. Also fix the typos reported by
codespell and the mypy error in tools/ci/idf_pytest/utils.py that
surfaced once the file was touched, and switch check_for_file_paths.py
to the SPDX header (removing it from the copyright ignore list).
we mock the missing packages in pytest_collectstart in plugin.py.
but here the common_test_methods are imported by other scripts, which
got executed earlier.