mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
Clean up mypy type errors and pylint errors/warnings in tools/perf/tests/shell/lib/ (attr.py, perf_json_output_lint.py, and perf_metric_validation.py): - Fix E0606 (possibly-used-before-assignment) in perf_metric_validation.py by importing sys at module level. - Add type annotations for stack, second_results, collectlist, get_bounds(), and main() in perf_metric_validation.py. - Avoid assigning -1 to list[int] expected_items in perf_json_output_lint.py, rename shadowing variables, and remove redundant lambdas. - Remove unnecessary semicolons, use lazy logging arguments, specify exception types and file encodings, and initialize module-level logger in attr.py. Also update tools/perf/tests/shell/lib/setup_python.sh to: - Avoid x-prefix string comparisons. - Export PYTHON and resolve PYTHONPATH and PERF_EXEC_PATH from BASH_SOURCE[0], ../../../python (for nested test directories such as coresight/), and the directory containing the perf binary so out-of-tree builds and standalone perf python scripts work seamlessly. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
||
|---|---|---|
| .. | ||
| attr.py | ||
| perf_has_symbol.sh | ||
| perf_json_output_lint.py | ||
| perf_metric_validation_rules.json | ||
| perf_metric_validation.py | ||
| perf_record.sh | ||
| probe_vfs_getname.sh | ||
| probe.sh | ||
| setup_python.sh | ||
| stat_output.sh | ||
| waiting.sh | ||