From bafa69098a182a764119ba6633ad7e40a5009b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Tue, 27 Feb 2024 11:10:21 +0800 Subject: [PATCH] style/doc fixes (NFC) --- artiq/frontend/artiq_master.py | 14 +++++++------- artiq/frontend/artiq_run.py | 3 ++- artiq/master/scheduler.py | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/artiq/frontend/artiq_master.py b/artiq/frontend/artiq_master.py index f61d6cf52..3e5d4dd11 100755 --- a/artiq/frontend/artiq_master.py +++ b/artiq/frontend/artiq_master.py @@ -57,10 +57,10 @@ def get_argparser(): log_args(parser) parser.add_argument("--name", - help="friendly name, displayed in dashboards " - "to identify master instead of server address") - parser.add_argument("--log-submissions", default=None, - help="set the filename to create the experiment subimission") + help="friendly name, displayed in dashboards " + "to identify master instead of server address") + parser.add_argument("--log-submissions", default=None, + help="log experiment submissions to specified file") return parser @@ -81,8 +81,7 @@ def main(): bind, args.port_broadcast)) atexit_register_coroutine(server_broadcast.stop, loop=loop) - log_forwarder.callback = (lambda msg: - server_broadcast.broadcast("log", msg)) + log_forwarder.callback = lambda msg: server_broadcast.broadcast("log", msg) def ccb_issue(service, *args, **kwargs): msg = { "service": service, @@ -106,7 +105,8 @@ def main(): repo_backend, worker_handlers, args.experiment_subdir) atexit.register(experiment_db.close) - scheduler = Scheduler(RIDCounter(), worker_handlers, experiment_db, args.log_submissions) + scheduler = Scheduler(RIDCounter(), worker_handlers, experiment_db, + args.log_submissions) scheduler.start(loop=loop) atexit_register_coroutine(scheduler.stop, loop=loop) diff --git a/artiq/frontend/artiq_run.py b/artiq/frontend/artiq_run.py index 19d83e787..d46bad022 100755 --- a/artiq/frontend/artiq_run.py +++ b/artiq/frontend/artiq_run.py @@ -178,7 +178,8 @@ class ArgumentManager(ProcessArgumentManager): user_input_deser = pyon.decode(user_input) value = processor.process(user_input_deser) except: - logger.error("failed to process user input, retrying", exc_info=True) + logger.error("failed to process user input, retrying", + exc_info=True) else: success = True result[key] = value diff --git a/artiq/master/scheduler.py b/artiq/master/scheduler.py index 451e5c84c..7d4179a63 100644 --- a/artiq/master/scheduler.py +++ b/artiq/master/scheduler.py @@ -156,7 +156,7 @@ class RunPool: run = Run(rid, pipeline_name, wd, expid, priority, due_date, flush, self, repo_msg=repo_msg) - if self.log_submissions is not None: + if self.log_submissions is not None: self.log_submission(rid, expid) self.runs[rid] = run self.state_changed.notify() @@ -514,4 +514,4 @@ class Scheduler: if run.termination_requested: return True return False - \ No newline at end of file +