From d970fb65df7dfdf20551a6169575dcdfac38a3ea Mon Sep 17 00:00:00 2001 From: Thomas Polasek Date: Fri, 6 Dec 2024 10:37:02 -0800 Subject: [PATCH] [codemod][pyfmt][ruff] Convert FBCODE to use the Ruff Formatter Summary: Converts the directory specified to use the Ruff formatter. This is the last big diff to convert all of Fbcode to Ruff. pomsky_fix_bugs drop-conflicts bypass-github-export-checks allow-large-files Reviewed By: amyreese Differential Revision: D66886610 fbshipit-source-id: 8276a7f6164efec189ca0b87e535543ed5bc3615 --- src/hack_forked/test/unit/utils/to_lsp.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/hack_forked/test/unit/utils/to_lsp.py b/src/hack_forked/test/unit/utils/to_lsp.py index 0537f4f74f2..e4e605a562d 100644 --- a/src/hack_forked/test/unit/utils/to_lsp.py +++ b/src/hack_forked/test/unit/utils/to_lsp.py @@ -27,6 +27,7 @@ because a closed pipe is an error for the language server. You can terminate the connection explicitly with control-C. """ + import fileinput import sys import time @@ -63,17 +64,13 @@ def to_http(line): "method": "{method}", "params": {params} }} - """.strip().format( - method=method, params=line - ) + """.strip().format(method=method, params=line) content_length = len(json_rpc_payload) return """ Content-Length: {}\r \r {} -""".strip().format( - content_length, json_rpc_payload - ) +""".strip().format(content_length, json_rpc_payload) if __name__ == "__main__":