diff --git a/enterprise_gateway/services/processproxies/processproxy.py b/enterprise_gateway/services/processproxies/processproxy.py index 405adfbc..80f9a565 100644 --- a/enterprise_gateway/services/processproxies/processproxy.py +++ b/enterprise_gateway/services/processproxies/processproxy.py @@ -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 diff --git a/enterprise_gateway/tests/test_gatewayapp.py b/enterprise_gateway/tests/test_gatewayapp.py index 8e0f59cf..b4490f31 100644 --- a/enterprise_gateway/tests/test_gatewayapp.py +++ b/enterprise_gateway/tests/test_gatewayapp.py @@ -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_")