mirror of
https://github.com/Z3Prover/z3
synced 2026-07-17 12:35:44 +00:00
simplify skill scripts: expose find_repo_root, fix split string, simplify label
- z3db.py: rename _find_repo_root to find_repo_root (make public) and add require_repo_root helper that exits on failure; update docstring and internal caller; fix unnecessary string literal split in log() - memory_safety.py: remove 13-line duplicate find_repo_root function; import and use require_repo_root from z3db instead - static_analysis.py: simplify two-line label assignment in print_findings to a single expression using 'or' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
59bb444694
commit
4dec7b1324
3 changed files with 17 additions and 22 deletions
|
|
@ -176,9 +176,7 @@ def print_findings(findings: list):
|
|||
return
|
||||
|
||||
for f in findings:
|
||||
label = f["category"]
|
||||
if f["type"]:
|
||||
label = f["type"]
|
||||
label = f["type"] or f["category"]
|
||||
print(f"[{label}] {f['file']}:{f['line']}: {f['description']}")
|
||||
|
||||
print()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue