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
  • Loading branch information
pre-commit-ci[bot] committed Jun 25, 2024
1 parent adeca66 commit 5026cc6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 12 additions & 3 deletions pympipool/shared/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,21 @@ def bind_to_random_port(self):
"""
return self._socket.bind_to_random_port("tcp://*")

def bootup(self, command_lst: list[str], prefix_name: Optional[str] = None, prefix_path: Optional[str] = None,):
def bootup(
self,
command_lst: list[str],
prefix_name: Optional[str] = None,
prefix_path: Optional[str] = None,
):
"""
Boot up the client process to connect to the SocketInterface.
Args:
command_lst (list): list of strings to start the client process
"""
self._interface.bootup(command_lst=command_lst, prefix_name=prefix_name, prefix_path=prefix_path)
self._interface.bootup(
command_lst=command_lst, prefix_name=prefix_name, prefix_path=prefix_path
)

def shutdown(self, wait: bool = True):
result = None
Expand Down Expand Up @@ -133,7 +140,9 @@ def interface_bootup(
"--zmqport",
str(interface.bind_to_random_port()),
]
interface.bootup(command_lst=command_lst, prefix_name=prefix_name, prefix_path=prefix_path)
interface.bootup(
command_lst=command_lst, prefix_name=prefix_name, prefix_path=prefix_path
)
return interface


Expand Down
8 changes: 7 additions & 1 deletion pympipool/shared/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def __init__(
)
self._process = None

def bootup(self, command_lst: list[str], prefix_name: Optional[str] = None, prefix_path: Optional[str] = None,):
def bootup(
self,
command_lst: list[str],
prefix_name: Optional[str] = None,
prefix_path: Optional[str] = None,
):
if prefix_name is None and prefix_path is None:
self._process = subprocess.Popen(
args=self.generate_command(command_lst=command_lst),
Expand All @@ -46,6 +51,7 @@ def bootup(self, command_lst: list[str], prefix_name: Optional[str] = None, pref
)
else:
import conda_subprocess

self._process = conda_subprocess.Popen(
args=self.generate_command(command_lst=command_lst),
cwd=self._cwd,
Expand Down

0 comments on commit 5026cc6

Please sign in to comment.