Skip to content

Commit

Permalink
remove #noqas from code
Browse files Browse the repository at this point in the history
  • Loading branch information
kchilleri committed Jan 3, 2025
1 parent 9751e56 commit 2471a55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions beeflow/client/bee_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!')
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion beeflow/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2471a55

Please sign in to comment.