From 2471a55358db58a5bf119d55071b7aa4b57e0ecd Mon Sep 17 00:00:00 2001 From: Krishna Chilleri Date: Fri, 3 Jan 2025 15:11:09 -0700 Subject: [PATCH] remove #noqas from code --- beeflow/client/bee_client.py | 5 ++--- beeflow/client/core.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/beeflow/client/bee_client.py b/beeflow/client/bee_client.py index 3e6ea149..863f1c4e 100644 --- a/beeflow/client/bee_client.py +++ b/beeflow/client/bee_client.py @@ -143,11 +143,11 @@ def check_db_flags(start_hn): def check_hostname(curr_hn): """Check current front end name matches the one beeflow was started on.""" - if get_hostname() and curr_hn != get_hostname() and check_backend_status() == "": # noqa: don't use set + if get_hostname() and curr_hn != get_hostname() and check_backend_status() == "": warn(f'beeflow was started on "{get_hostname()}" and you are trying to ' f'run a command on "{curr_hn}".') sys.exit(1) - elif get_hostname() and curr_hn != get_hostname() and check_backend_status() == "true": # noqa: don't use set + elif get_hostname() and curr_hn != get_hostname() and check_backend_status() == "true": check_backend_jobs(curr_hn, command=True) if get_hostname() == "" and check_backend_status() == "": warn('beeflow has not been started!') @@ -787,5 +787,4 @@ def main(): # Ignore W0511: This allows us to have TODOs in the code # Ignore R1732: Significant code restructuring required to fix -# Ignore R1714: Not using a set instead # pylama:ignore=W0511,R1732 diff --git a/beeflow/client/core.py b/beeflow/client/core.py index 3a7a903b..031c4881 100644 --- a/beeflow/client/core.py +++ b/beeflow/client/core.py @@ -407,7 +407,7 @@ def start(foreground: bool = typer.Option(False, '--foreground', '-F', '-B', help='allow to run on a backend node')): """Start all BEE components.""" start_hn = socket.gethostname() # hostname when beeflow starts - if bee_client.get_hostname() == "" and bee_client.check_backend_status() == "": # noqa + if bee_client.get_hostname() == "" and bee_client.check_backend_status() == "": bee_client.setup_hostname(start_hn) # add to client db else: bee_client.check_db_flags(start_hn)