`!Lookup` does not enrich on the fly
- Dominant language
- Python
- Stars
- 110
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Template:
```yaml
!Defaults
x:
y: 5
z: !Var x
---
workie: !Lookup x.y
no_workie: !Lookup z.y
```
Expected output:
```yaml
workie: 5
no_workie: 5
```
Actual output:
```yaml
Traceback (most recent call last):
File "/usr/local/bin/emrichen", line 11, in
load_entry_point('emrichen', 'console_scripts', 'emrichen')()
File "/Users/sapaj1/Hobby/emrichen/emrichen/__main__.py", line 111, in main
output = template.render(context, format=args.output_format)
File "/Users/sapaj1/Hobby/emrichen/emrichen/template.py", line 22, in render
enriched = self.enrich(context)
File "/Users/sapaj1/Hobby/emrichen/emrichen/template.py", line 19, in enrich
return context.enrich(self.template)
File "/Users/sapaj1/Hobby/emrichen/emrichen/context.py", line 37, in enrich
item = self.enrich(item)
File "/Users/sapaj1/Hobby/emrichen/emrichen/context.py", line 30, in enrich
val = self.enrich(val)
File "/Users/sapaj1/Hobby/emrichen/emrichen/context.py", line 21, in enrich
return self.enrich(value.enrich(self))
File "/Users/sapaj1/Hobby/emrichen/emrichen/tags/lookup.py", line 19, in enrich
raise KeyError(f'{self}: no matches for {self.data}')
KeyError: "Lookup('z.y'): no matches for z.y"
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.