Skip to content

Commit

Permalink
more temporary debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Dec 18, 2024
1 parent 1a98d35 commit b7a6995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/galaxy/tools/parameters/wrapped.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections import UserDict
import logging
from typing import (
Any,
Dict,
Expand Down Expand Up @@ -30,6 +31,7 @@
split_flattened_repeat_key,
)

log = logging.getLogger(__name__)
PARAMS_UNWRAPPED = object()


Expand All @@ -47,11 +49,13 @@ def set_legacy_alias(self, new_key: str, old_key: str):
self._legacy_mapping[old_key] = new_key

def __getitem__(self, key):
# log.error(f"__getitem__ {key=} {self.data=} {self._legacy_mapping=}")
if key not in self.data and key in self._legacy_mapping:
return super().__getitem__(self._legacy_mapping[key])
return super().__getitem__(key)

def __contains__(self, key: object) -> bool:
log.error(f"__contains__ {key=} {self.data=} {self._legacy_mapping=}")
if super().__contains__(key):
return True
return key in self._legacy_mapping
Expand Down

0 comments on commit b7a6995

Please sign in to comment.