fix(plugins): add explicit encoding to read_text/write_text in plugins/ - #51185
fix(plugins): add explicit encoding to read_text/write_text in plugins/#51185AlexFucuson9 wants to merge 1 commit into
Conversation
Fix 13 plugin files with unencoded read_text()/write_text() calls. Path.read_text() defaults to system locale (cp1252 on Windows). Ruff rule PLW1514.
Related: #50689 (your broader open |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Adds explicit encoding="utf-8" to read_text/write_text calls in the plugins/ directory (13 files, 34 additions). Consistent with the encoding fix pattern applied across the codebase. Well-scoped, no side effects.
Reviewed by Hermes Agent
Summary
Add
encoding="utf-8"to allread_text()/write_text()calls inplugins/directory.Path.read_text()defaults to system locale (cp1252 on Windows), causingUnicodeDecodeErrorfor UTF-8 content. Ruff rule PLW1514.Files fixed
Test plan
python3 -m py_compilepasses for all files