From c8a2f5b222b3a4dc4d533183fa8e5d35beefe3e1 Mon Sep 17 00:00:00 2001 From: rdimaio Date: Mon, 18 Mar 2024 17:33:13 +0100 Subject: [PATCH] Testing: Remove extra parentheses when not needed; #6538 See also: - UP034 --- lib/rucio/common/pcache.py | 2 +- lib/rucio/common/utils.py | 2 +- .../2190e703eb6e_move_rse_settings_to_rse_attributes.py | 2 +- tools/github/workflow/set_branch_output_env.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rucio/common/pcache.py b/lib/rucio/common/pcache.py index ddcd6f2697..80fd03ec99 100644 --- a/lib/rucio/common/pcache.py +++ b/lib/rucio/common/pcache.py @@ -258,7 +258,7 @@ def parse_args(self, args): elif opt in ("-r", "--retry"): self.max_retries = int(arg) elif opt in ("-V", "--version"): - print((str(self.version))) + print(str(self.version)) sys.exit(0) elif opt in ("-l", "--log"): self.log_file = arg diff --git a/lib/rucio/common/utils.py b/lib/rucio/common/utils.py index f68efc84a5..2fbe27fe12 100644 --- a/lib/rucio/common/utils.py +++ b/lib/rucio/common/utils.py @@ -1658,7 +1658,7 @@ def start(): while not graceful_stop.is_set(): starttime = time.time() action() - time.sleep(interval - ((time.time() - starttime))) + time.sleep(interval - (time.time() - starttime)) t = threading.Thread(target=start) return t diff --git a/lib/rucio/db/sqla/migrate_repo/versions/2190e703eb6e_move_rse_settings_to_rse_attributes.py b/lib/rucio/db/sqla/migrate_repo/versions/2190e703eb6e_move_rse_settings_to_rse_attributes.py index 4c6728a653..72c37f9595 100644 --- a/lib/rucio/db/sqla/migrate_repo/versions/2190e703eb6e_move_rse_settings_to_rse_attributes.py +++ b/lib/rucio/db/sqla/migrate_repo/versions/2190e703eb6e_move_rse_settings_to_rse_attributes.py @@ -83,7 +83,7 @@ def upgrade(): ) conn.execute( - sa.insert((get_rse_attr_association())).from_select( + sa.insert(get_rse_attr_association()).from_select( ["rse_id", "key", "value", "created_at", "updated_at"], select_stmt ) ) diff --git a/tools/github/workflow/set_branch_output_env.py b/tools/github/workflow/set_branch_output_env.py index 7b4b210dea..a8492778f2 100755 --- a/tools/github/workflow/set_branch_output_env.py +++ b/tools/github/workflow/set_branch_output_env.py @@ -21,7 +21,7 @@ def set_output(name: str, value: str) -> None: def main(): - set_output("branch", str((env.get("GITHUB_BASE_REF", None) if env.get("GITHUB_BASE_REF", None) else env.get("GITHUB_REF", "master")))) + set_output("branch", str(env.get("GITHUB_BASE_REF", None) if env.get("GITHUB_BASE_REF", None) else env.get("GITHUB_REF", "master"))) if __name__ == "__main__":