Skip to content

Commit

Permalink
small flake8 fixes (#5058)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim authored Aug 12, 2022
1 parent 04437b8 commit 4ddb3ee
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cylc/flow/network/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ def _socket_bind(self, min_port, max_port, srv_prv_key_loc=None):
try:
server_public_key, server_private_key = zmq.auth.load_certificate(
srv_prv_key_info.full_key_path)
except (ValueError):
except ValueError:
raise ServiceFileError(
f"Failed to find server's public "
f"key in "
f"{srv_prv_key_info.full_key_path}."
)
except(OSError):
except OSError:
raise ServiceFileError(
f"IO error opening server's private "
f"key from "
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/parsec/fileparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def process_plugins(fpath, opts):
f"{extra_vars['templating_detected']} and "
f"{plugin_result['templating_detected']}"
)
elif(
elif (
'templating_detected' in plugin_result and
plugin_result['templating_detected'] is not None
):
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/tui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def get_snapshot(self):
# Distinguish stopped flow from non-existent flow.
self.client = None
full_path = Path(get_workflow_run_dir(self.reg))
if(
if (
(full_path / WorkflowFiles.SUITE_RC).is_file()
or (full_path / WorkflowFiles.FLOW_FILE).is_file()
):
Expand Down
3 changes: 2 additions & 1 deletion cylc/flow/workflow_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ class ContactFileFields:
"""The process ID of the running workflow on ``CYLC_WORKFLOW_HOST``."""

COMMAND = 'CYLC_WORKFLOW_COMMAND'
"""The command that was used to run the workflow on ``CYLC_WORKFLOW_HOST```.
"""The command that was used to run the workflow on
``CYLC_WORKFLOW_HOST```.
Note that this command may be affected by:
Expand Down
3 changes: 2 additions & 1 deletion cylc/flow/xtriggers/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@


def echo(*args, **kwargs):
"""Prints args to stdout and return success only if kwargs['succeed'] is True.
"""Prints args to stdout and return success only if kwargs['succeed']
is True.
This may be a useful aid to understanding how xtriggers work.
Expand Down

0 comments on commit 4ddb3ee

Please sign in to comment.