Skip to content

Commit

Permalink
Allow resolving references on Parameterized method (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Sep 24, 2023
1 parent 86e8bcf commit eed20b6
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 eed20b6

Please sign in to comment.