fix(tools/render_jsonl): apply ruff format
Earlier commit fixed ruff lint but missed the formatter check. This applies `ruff format` — adds standard PEP8 blank lines between functions, splits one inline list. No behavior change. Verified: both `ruff format --check` and `ruff check` pass cleanly. Tool still renders correctly.
This commit is contained in:
@@ -11,10 +11,12 @@ Usage:
|
||||
|
||||
Stdlib only. Python 3.9+. Read-only on the input.
|
||||
"""
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def extract_text(content):
|
||||
if isinstance(content, str):
|
||||
return content.strip()
|
||||
@@ -28,6 +30,7 @@ def extract_text(content):
|
||||
return "\n".join(parts)
|
||||
return ""
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print(__doc__)
|
||||
@@ -62,7 +65,8 @@ def main():
|
||||
f"# Claude Code transcript: {src}",
|
||||
f"# Total turns: {len(turns)}",
|
||||
f"# Date range : {min(stamps) if stamps else 'n/a'} -> {max(stamps) if stamps else 'n/a'}",
|
||||
"#" + "-" * 70, "",
|
||||
"#" + "-" * 70,
|
||||
"",
|
||||
]
|
||||
out.write("\n".join(header))
|
||||
for ts, role, text in turns:
|
||||
@@ -71,5 +75,6 @@ def main():
|
||||
out.close()
|
||||
print(f"Wrote {len(turns)} turns to {sys.argv[2]}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user