Skip to content

Commit

Permalink
Allow resolving references on Parameterized method
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 24, 2023
1 parent 00dc733 commit 1c47ebb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions param/parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ def resolve_ref(reference, recursive=False):
kwargs = list(dinfo.get('kw', {}).values())
refs = []
for arg in (args + kwargs):
if isinstance(arg, str):
owner = get_method_owner(reference)
if arg in owner.param:
arg = owner.param[arg]
else:
arg = getattr(owner, arg)
refs.extend(resolve_ref(arg))
return refs
elif isinstance(reference, Parameter):
Expand Down

0 comments on commit 1c47ebb

Please sign in to comment.