From 8adf4153656100e3c1f0bb5d2153dec1f8e61f99 Mon Sep 17 00:00:00 2001 From: Mark Schreiber Date: Thu, 23 Jan 2025 17:31:53 -0500 Subject: [PATCH] lint fixes --- omics/cli/rerun/__main__.py | 6 +++--- omics/cli/run_analyzer/__main__.py | 4 ++-- omics/cli/run_analyzer/timeline.py | 2 +- omics/cli/run_analyzer/writeconfig.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/omics/cli/rerun/__main__.py b/omics/cli/rerun/__main__.py index 87f299e..ca01d10 100755 --- a/omics/cli/rerun/__main__.py +++ b/omics/cli/rerun/__main__.py @@ -310,8 +310,8 @@ 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") @@ -319,7 +319,7 @@ def set_param(rqst, key, key0, val=None): 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() diff --git a/omics/cli/run_analyzer/__main__.py b/omics/cli/run_analyzer/__main__.py index f1c73c2..6b7a9e4 100755 --- a/omics/cli/run_analyzer/__main__.py +++ b/omics/cli/run_analyzer/__main__.py @@ -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 @@ -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", diff --git a/omics/cli/run_analyzer/timeline.py b/omics/cli/run_analyzer/timeline.py index bc71c25..c9c69bd 100644 --- a/omics/cli/run_analyzer/timeline.py +++ b/omics/cli/run_analyzer/timeline.py @@ -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"{title}"), p_run) diff --git a/omics/cli/run_analyzer/writeconfig.py b/omics/cli/run_analyzer/writeconfig.py index dccbf2d..427a9ce 100644 --- a/omics/cli/run_analyzer/writeconfig.py +++ b/omics/cli/run_analyzer/writeconfig.py @@ -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)