Skip to content

Commit

Permalink
[ignore] Add inline comment to explain the use of the additional cond…
Browse files Browse the repository at this point in the history
…itional
  • Loading branch information
akinross authored and lhercot committed Mar 1, 2024
1 parent 0d90d05 commit 291c68b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/filter/listify.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ def listify_worker(d, keys, depth, cache, prefix):
if k == keys[depth + 1] and isinstance(v, (dict, list)):
for result in listify_worker({k: v}, keys, depth + 1, cache_work, prefix):
yield result
# Conditional to support nested dictionaries which are detected by item is string
elif isinstance(item, str) and isinstance(d[keys[depth]], dict):
for result in listify_worker({item: d[keys[depth]][item]}, keys, depth + 1, cache_work, prefix):
yield result
Expand Down

0 comments on commit 291c68b

Please sign in to comment.