From 46aeb769933dc5c98780a45de4766ce7c43a80d6 Mon Sep 17 00:00:00 2001 From: Thomas Harrop Date: Thu, 20 Jun 2024 14:14:43 +1000 Subject: [PATCH] tidy linting --- lib/galaxy/datatypes/binary.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/datatypes/binary.py b/lib/galaxy/datatypes/binary.py index 742be237e2a7..7fc9f4652105 100644 --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -3776,18 +3776,13 @@ class Pod5(Binary): file_ext = "pod5" def sniff(self, filename: str) -> bool: - expected_signature = bytes( - [0x8B, 0x50, 0x4F, 0x44, 0x0D, 0x0A, 0x1A, 0x0A] - ) + expected_signature = bytes([0x8B, 0x50, 0x4F, 0x44, 0x0D, 0x0A, 0x1A, 0x0A]) try: with open(filename, "rb") as f: first_8_bytes = f.read(8) f.seek(-8, 2) last_8_bytes = f.read(8) - return ( - first_8_bytes == expected_signature - and last_8_bytes == expected_signature - ) + return first_8_bytes == expected_signature and last_8_bytes == expected_signature except Exception: return False