Skip to content

Commit

Permalink
Linting fixes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
adammcdonagh authored Jan 25, 2024
1 parent e6d2612 commit a52c303
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/opentaskpy/cli/task_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def main() -> None:
"""Parse args and call TaskRun class."""
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
epilog=dedent("""\
epilog=dedent(
"""\
Environment Variables:
There are several environment variables that can be used to impact the behaviour:
Expand All @@ -42,7 +43,8 @@ def main() -> None:
e.g. OTF_OVERRIDE_TRANSFER_DESTINATION_0_PROTOCOL_CREDENTIALS_USERNAME
"""),
"""
),
)

parser.add_argument(
Expand Down
4 changes: 1 addition & 3 deletions src/opentaskpy/remotehandlers/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,7 @@ def transfer_files(
remote_user = quote(remote_user)
remote_host = quote(remote_host)

remote_command = (
f'scp {SSH_OPTIONS} {" ".join(files)} {remote_user}@{remote_host}:"{destination_directory}"'
)
remote_command = f'scp {SSH_OPTIONS} {" ".join(files)} {remote_user}@{remote_host}:"{destination_directory}"'
self.logger.info(
f"[{self.spec['hostname']}] Transferring files via SCP: {remote_command}"
)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ def test_override_task_specific_attribute(write_dummy_variables_file, tmpdir):
# Override things
os.environ["OTF_OVERRIDE_TRANSFER_SOURCE_HOSTNAME"] = "non_existent_host"
os.environ["OTF_OVERRIDE_TRANSFER_DESTINATION_0_HOSTNAME"] = "non_existent_host2"
os.environ["OTF_OVERRIDE_TRANSFER_DESTINATION_0_PROTOCOL_CREDENTIALS_USERNAME"] = (
"my_username"
)
os.environ[
"OTF_OVERRIDE_TRANSFER_DESTINATION_0_PROTOCOL_CREDENTIALS_USERNAME"
] = "my_username"

# Load the task definition
config_loader = ConfigLoader(tmpdir)
Expand Down

0 comments on commit a52c303

Please sign in to comment.