Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
pre-commit-ci[bot] committed Feb 20, 2024
1 parent d9be3dc commit 0d9a556
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions enterprise_gateway/services/processproxies/processproxy.py
Original file line number Diff line number Diff line change
@@ -1333,9 +1333,9 @@ def _setup_connection_info(self, connect_info: dict) -> None:
f"Host assigned to the kernel is: '{self.assigned_host}' '{self.assigned_ip}'"
)

connect_info["ip"] = (
self.assigned_ip
) # Set connection to IP address of system where the kernel was launched
connect_info[
"ip"
] = self.assigned_ip # Set connection to IP address of system where the kernel was launched

if tunneling_enabled is True:
# Capture the current(tunneled) connect_info relative to the IP and ports (including the
@@ -1399,7 +1399,9 @@ def _update_connection(self, connect_info: dict) -> None:
Note: Do NOT update connect_info with IP and other such artifacts in this method/function.
"""
# Reset the ports to 0 so load can take place (which resets the members to value from file or json)...
self.kernel_manager.stdin_port = self.kernel_manager.iopub_port = (
self.kernel_manager.stdin_port = (
self.kernel_manager.iopub_port
) = (
self.kernel_manager.shell_port
) = self.kernel_manager.hb_port = self.kernel_manager.control_port = 0

6 changes: 3 additions & 3 deletions enterprise_gateway/tests/test_gatewayapp.py
Original file line number Diff line number Diff line change
@@ -96,9 +96,9 @@ def test_config_env_vars(self):
os.environ["EG_CERTFILE"] = "/test/fake.crt"
os.environ["EG_CLIENT_CA"] = "/test/fake_ca.crt"
os.environ["EG_SSL_VERSION"] = "3"
os.environ["EG_KERNEL_SESSION_PERSISTENCE"] = (
"True" # availability mode will be defaulted to replication
)
os.environ[
"EG_KERNEL_SESSION_PERSISTENCE"
] = "True" # availability mode will be defaulted to replication

self._assert_envs_to_traitlets("EG_")

0 comments on commit 0d9a556

Please sign in to comment.