From 646fc9d320d49daaebc8ccbcccfe978bf44d224a Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sat, 19 Sep 2026 00:02:51 -0700 Subject: [PATCH] chore(lsp): pass encoding=utf-8 in test_install_and_lint_fixes write_text calls Clears the Windows footgun scanner on the file the review follow-up touched. --- tests/agent/lsp/test_install_and_lint_fixes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/agent/lsp/test_install_and_lint_fixes.py b/tests/agent/lsp/test_install_and_lint_fixes.py index 901171909a..1f5d8fc599 100644 --- a/tests/agent/lsp/test_install_and_lint_fixes.py +++ b/tests/agent/lsp/test_install_and_lint_fixes.py @@ -78,7 +78,7 @@ def test_install_pip_finds_windows_scripts_launcher(tmp_path, monkeypatch): scripts_dir = install_mod.hermes_lsp_bin_dir().parent / "python-packages" / "Scripts" scripts_dir.mkdir(parents=True, exist_ok=True) launcher = scripts_dir / "fake-language-server.exe" - launcher.write_text("launcher\n") + launcher.write_text("launcher\n", encoding="utf-8") launcher.chmod(0o755) return MagicMock(returncode=0, stderr="") @@ -157,7 +157,7 @@ def test_check_lint_returns_error_for_real_ts_type_errors(tmp_path): from tools.file_operations import ShellFileOperations ts_file = tmp_path / "bad.ts" - ts_file.write_text("const x: string = 42;\n") + ts_file.write_text("const x: string = 42;\n", encoding="utf-8") env = LocalEnvironment() fops = ShellFileOperations(env)