Ching-Hwa Yu
Ching-Hwa Yu
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...
conf.py ``` var = {"a": "{var1}"} ``` dir/conf.py ``` var1 = "test" ``` code: ``` module_list = ["dir/conf.py", "conf.py"] cfg = config(*module_list, interpolate=True) print(cfg.var) ``` Result is: `{'a': '{var1}'}`
``` values_1 = {"a.b": "value"} values_2 = {"var": "{a.b}"} cfg = config( values_2, values_1, lowercase_keys=True, interpolate=True, ) print(cfg.var) ``` Results in: ``` File "/group/siv_roast_bkup/staff/chinghwa/python-configuration/config/configuration_set.py", line 113, in __getattr__ return self._from_configs("__getattr__",...
``` from config import config DICT = {"var": "1", "var1": "{var}"} cfg = config(DICT, interpolate=True) print(cfg.as_dict()) print(cfg.as_attrdict()) ``` Results is: ``` {'var': '1', 'var1': '{var}'} {'var': '1', 'var1': '{var}'} ```
When connecting with madbg client, the script dies and return with this error. Stack trace: ``` File ".../site-packages/madbg/api.py", line 57, in sigio_handler debugger, debugger_exit_stack = use_context(RemoteIPythonDebugger.start_from_new_connection(sock)) File ".../site-packages/madbg/utils.py", line 34,...
Make it so that _static_version.py and _version.py doesn't need to exist in repo. Use the default versions from miniver package.