Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
markjschreiber committed Jan 23, 2025
1 parent afec8cc commit 8adf415
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions omics/cli/rerun/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,16 @@ def set_param(rqst, key, key0, val=None):
rqst0 = start_run_request(run)
rqst = start_run_request(run, opts)
if rqst != rqst0:
out.write(f"Original request:\n{json.dumps(rqst0, indent=2)}\n") # noqa
out.write(f"StartRun request:\n{json.dumps(rqst, indent=2)}\n") # noqa
out.write(f"Original request:\n{json.dumps(rqst0, indent=2)}\n") # noqa
out.write(f"StartRun request:\n{json.dumps(rqst, indent=2)}\n") # noqa
if not opts["--dry-run"]:
try:
omics = boto3.client("omics")
resp = omics.start_run(**rqst)
except Exception as e:
die(f"StartRun failed: {e}")
del resp["ResponseMetadata"] # type: ignore
out.write(f"StartRun response:\n{json.dumps(resp, indent=2)}\n") # noqa
out.write(f"StartRun response:\n{json.dumps(resp, indent=2)}\n") # noqa

if opts["--out"]:
out.close()
Expand Down
4 changes: 2 additions & 2 deletions omics/cli/run_analyzer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def get_instance(cpus, mem):


def get_pricing(pricing, resource, region, hours):
key = f"{resource}:{region}" # noqa E231
key = f"{resource}:{region}" # noqa E231
price = get_pricing.pricing.get(key)
if price:
return price * hours
Expand Down Expand Up @@ -534,7 +534,7 @@ def get_timeline_event(res, resources):
def tocsv(val):
if val is None:
return ""
return f"{val:f}" if type(val) is float else str(val) # noqa E231
return f"{val:f}" if type(val) is float else str(val) # noqa E231

hdrs = [
"arn",
Expand Down
2 changes: 1 addition & 1 deletion omics/cli/run_analyzer/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def plot_timeline(tasks, title="", time_units="min", max_duration_hrs=5, show_pl
p_run.title.text = (
f"{title}, "
f"tasks: {len(tasks)}, "
f"wall time: {(_parse_time_str(max_stop_time) - _parse_time_str(min_creation_time)).total_seconds() * time_scale_factor:.2f} {time_units}" # noqa
f"wall time: {(_parse_time_str(max_stop_time) - _parse_time_str(min_creation_time)).total_seconds() * time_scale_factor:.2f} {time_units}" # noqa
)

layout = column(Div(text=f"<strong>{title}</strong>"), p_run)
Expand Down
2 changes: 1 addition & 1 deletion omics/cli/run_analyzer/writeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def create_config(engine, task_resources, filename):
cpus = {task_resources[task]['cpus']}
memory = {task_resources[task]['mem']}.GB
}}
""" # noqa E202
""" # noqa E202
)
task_strings.append(task_string)

Expand Down

0 comments on commit 8adf415

Please sign in to comment.