diff options
author | BonfaceKilz | 2021-03-10 12:51:36 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-03-10 12:53:12 +0300 |
commit | e6c8d3f3a43621ccc34f77b50e220eb684617146 (patch) | |
tree | f9f8b00748c578185592e3967b2f9b3d2ee56459 /gn3/commands.py | |
parent | d31ccc82aa84432c6cfef1a0a2d8f34beee179cd (diff) | |
download | genenetwork3-e6c8d3f3a43621ccc34f77b50e220eb684617146.tar.gz |
Apply yapf file formatting to file
Diffstat (limited to 'gn3/commands.py')
-rw-r--r-- | gn3/commands.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gn3/commands.py b/gn3/commands.py index 7287348..219f4fd 100644 --- a/gn3/commands.py +++ b/gn3/commands.py @@ -12,29 +12,29 @@ from redis.client import Redis # Used only in type hinting from gn3.exceptions import RedisConnectionError -def compose_gemma_cmd( - gemma_wrapper_cmd: str = "gemma-wrapper", - gemma_wrapper_kwargs: Optional[Dict] = None, - gemma_kwargs: Optional[Dict] = None, - gemma_args: Optional[List] = None) -> str: +def compose_gemma_cmd(gemma_wrapper_cmd: str = "gemma-wrapper", + gemma_wrapper_kwargs: Optional[Dict] = None, + gemma_kwargs: Optional[Dict] = None, + gemma_args: Optional[List] = None) -> str: """Compose a valid GEMMA command given the correct values""" cmd = f"{gemma_wrapper_cmd} --json" if gemma_wrapper_kwargs: cmd += " " # Add extra space between commands - cmd += " ".join([f"--{key} {val}" for key, val - in gemma_wrapper_kwargs.items()]) + cmd += " ".join( + [f"--{key} {val}" for key, val in gemma_wrapper_kwargs.items()]) cmd += " -- " if gemma_kwargs: - cmd += " ".join([f"-{key} {val}" - for key, val in gemma_kwargs.items()]) + cmd += " ".join([f"-{key} {val}" for key, val in gemma_kwargs.items()]) if gemma_args: cmd += " " cmd += " ".join([f"{arg}" for arg in gemma_args]) return cmd -def queue_cmd(conn: Redis, job_queue: str, - cmd: str, email: Optional[str] = None) -> str: +def queue_cmd(conn: Redis, + job_queue: str, + cmd: str, + email: Optional[str] = None) -> str: """Given a command CMD; (optional) EMAIL; and a redis connection CONN, queue it in Redis with an initial status of 'queued'. The following status codes are supported: |