From 525b88beb3ceaa7a321c8be1b7d5239f81e9af95 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Fri, 2 Aug 2024 13:35:11 -0400 Subject: [PATCH] [skip ci] Fix docstring for forward() (#2054) The docstring for tunnels / forward() has been broken since 2 months, since the `\n` in the docstring wasn't escaped and that broke inspect.cleandoc(), which trims consistent leading whitespace after the first line Not going to tag elias because he's on PTO --- modal/_tunnel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modal/_tunnel.py b/modal/_tunnel.py index 37e1212c9..f4bf9f018 100644 --- a/modal/_tunnel.py +++ b/modal/_tunnel.py @@ -152,7 +152,7 @@ def some_function(): with modal.forward(port=22, unencrypted=True) as tunnel: hostname, port = tunnel.tcp_socket connection_cmd = f'ssh -p {port} root@{hostname}' - print(f"ssh into container using:\n{connection_cmd}") + print(f"ssh into container using: {connection_cmd}") time.sleep(3600) # keep alive for 1 hour or until killed ```