We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conf.py
var1 = "2020" var2 = "{var1}" var3 = "{var1}/{var2}"
mytest.py
module_list = ["conf.py"] cfg = config(*module_list, separator="__", interpolate=True, interpolate_type=InterpolateEnumType.DEEP_NO_BACKTRACK) print(cfg["var3"])
Sometimes it will work and return
2020/2020
But other times, it will return
File "/home/chinghwa/.pyenv/versions/py365-dev/lib/python3.6/site-packages/config/configuration_set.py", line 110, in __getitem__ return self._from_configs("__getitem__", item) File "/home/chinghwa/.pyenv/versions/py365-dev/lib/python3.6/site-packages/config/configuration_set.py", line 83, in _from_configs return interpolate_object(args[0], values[0], d, self._interpolate_type) File "/home/chinghwa/.pyenv/versions/py365-dev/lib/python3.6/site-packages/config/helpers.py", line 197, in interpolate_object return interpolate_deep(attr, obj, d, {}, {}, method) File "/home/chinghwa/.pyenv/versions/py365-dev/lib/python3.6/site-packages/config/helpers.py", line 147, in interpolate_deep raise KeyError(variable) KeyError: 'var1'
The text was updated successfully, but these errors were encountered:
I'll take a look at it this weekend. I'm planning on unifying the way the templating works that will hopefully fix all these issues
Sorry, something went wrong.
Any chance at looking at this again in the near future? 😀
No branches or pull requests
conf.py
mytest.py
Sometimes it will work and return
But other times, it will return
The text was updated successfully, but these errors were encountered: