fix: pass language to format_generated_code for correct temp file extension#1896
Conversation
…ension format_generated_code was called without the language parameter in process_review(), defaulting to "python". This created temp files with .py extension when formatting JS/TS code, causing prettier to fail. Trace IDs: 11e9745d, 1578f081, 7e8abab2 (73 affected logs total) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @mohammedahmed18's task in 2m 47s —— View job PR Review SummaryPrek ChecksAll checks pass (ruff lint, ruff format). Code ReviewFix is correct. Both call sites of Minor: Unused variables in test ( captured_paths = [] # never used
original_apply = format_code.__module__ # never usedThese appear to be leftover from an earlier draft of Duplicate DetectionNo duplicates detected — Test CoverageThree new unit tests added covering JavaScript, TypeScript, and Python default extension. Tests correctly mock Last updated: 2026-03-25T16:08Z |
Summary
format_generated_codewas called without thelanguageparameter inprocess_review(), defaulting to"python". This created temp files with.pyextension when formatting JS/TS code, causingnpx prettier --writeto fail on 73/1026 Strapi optimization runs.language=code_lang(fromself.function_to_optimize.language) to both call sites.Trace IDs
11e9745d,1578f081,158297d4,7e8abab2(73 affected logs total)Test plan
prekpasses🤖 Generated with Claude Code