From 27beffd8900ac38253dbf469ab9144d19c5c635e Mon Sep 17 00:00:00 2001 From: John Davis Date: Thu, 30 Nov 2023 17:21:46 -0500 Subject: [PATCH] Simplify: just check for both keys --- lib/galaxy/tools/wrappers.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/galaxy/tools/wrappers.py b/lib/galaxy/tools/wrappers.py index f4fa82410eb9..81a904c953de 100644 --- a/lib/galaxy/tools/wrappers.py +++ b/lib/galaxy/tools/wrappers.py @@ -450,10 +450,6 @@ def serialize(self, invalid_chars: Sequence[str] = ("/",)) -> Dict[str, Any]: def is_collection(self) -> bool: return False - @property - def file_name(self) -> str: - return self.get_file_name() - def is_of_type(self, *exts: str) -> bool: datatypes = [] if not self.datatypes_registry: @@ -475,7 +471,7 @@ def __str__(self) -> str: return str(self.unsanitized.get_file_name()) def __getattr__(self, key: Any) -> Any: - if self.false_path is not None and key == "get_file_name": + if self.false_path is not None and key in ("get_file_name", "file_name"): # Path to dataset was rewritten for this job. return lambda *args, **kwargs: self.false_path elif key in ("extra_files_path", "files_path"):