Skip to content

Commit 877dbd1

Browse files
committed
Don't pass file content to stdin of pyrefly
1 parent ecc0f76 commit 877dbd1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

extensions/fine_python_pyrefly/fine_python_pyrefly/lint_handler.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ class PyreflyLintHandlerConfig(code_action.ActionHandlerConfig):
1818
class PyreflyLintHandler(
1919
code_action.ActionHandler[lint_action.LintAction, PyreflyLintHandlerConfig]
2020
):
21+
"""
22+
NOTE: pyrefly currently can check only saved files, not file content provided by
23+
FineCode. In environments like IDE, messages from pyrefly will be updated only after
24+
save of a file.
25+
"""
2126
CACHE_KEY = "PyreflyLinter"
2227

2328
def __init__(
@@ -90,10 +95,7 @@ async def run_pyrefly_lint_on_single_file(
9095

9196
cmd_str = " ".join(cmd)
9297
pyrefly_process = await self.command_runner.run(cmd_str)
93-
94-
pyrefly_process.write_to_stdin(file_content)
95-
pyrefly_process.close_stdin() # Signal EOF
96-
98+
9799
await pyrefly_process.wait_for_end()
98100

99101
output = pyrefly_process.get_output()

0 commit comments

Comments
 (0)