From a52c3036e856136c116f03d3cc50b40b0a3b8bf6 Mon Sep 17 00:00:00 2001 From: Adam McDonagh <27215476+adammcdonagh@users.noreply.github.com> Date: Thu, 25 Jan 2024 22:17:07 +0000 Subject: [PATCH] Linting fixes 2 --- src/opentaskpy/cli/task_run.py | 6 ++++-- src/opentaskpy/remotehandlers/ssh.py | 4 +--- tests/test_config_loader.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/opentaskpy/cli/task_run.py b/src/opentaskpy/cli/task_run.py index c4475b0..8488661 100644 --- a/src/opentaskpy/cli/task_run.py +++ b/src/opentaskpy/cli/task_run.py @@ -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: @@ -42,7 +43,8 @@ def main() -> None: e.g. OTF_OVERRIDE_TRANSFER_DESTINATION_0_PROTOCOL_CREDENTIALS_USERNAME - """), + """ + ), ) parser.add_argument( diff --git a/src/opentaskpy/remotehandlers/ssh.py b/src/opentaskpy/remotehandlers/ssh.py index b0dc3fa..30de4cd 100644 --- a/src/opentaskpy/remotehandlers/ssh.py +++ b/src/opentaskpy/remotehandlers/ssh.py @@ -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}" ) diff --git a/tests/test_config_loader.py b/tests/test_config_loader.py index f827dbd..a8f97c8 100644 --- a/tests/test_config_loader.py +++ b/tests/test_config_loader.py @@ -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)