Unverified Commit 8441f231 authored by Jerry Jiarui XU's avatar Jerry Jiarui XU Committed by GitHub
Browse files

Update config Error msg (#267)

parent 19e4a06c
...@@ -151,9 +151,10 @@ class Config(object): ...@@ -151,9 +151,10 @@ class Config(object):
if isinstance(v, dict) and k in b and not v.pop(DELETE_KEY, False): if isinstance(v, dict) and k in b and not v.pop(DELETE_KEY, False):
if not isinstance(b[k], dict): if not isinstance(b[k], dict):
raise TypeError( raise TypeError(
f'{k}={v} cannot be inherited from base because {k} ' f'{k}={v} in child config cannot inherit from base '
'is a dict in the child config. You may ' f'because {k} is a dict in the child config but is of '
f'set `{DELETE_KEY}=True` to ignore the base config') f'type {type(b[k])} in base config. You may set '
f'`{DELETE_KEY}=True` to ignore the base config')
b[k] = Config._merge_a_into_b(v, b[k]) b[k] = Config._merge_a_into_b(v, b[k])
else: else:
b[k] = v b[k] = v
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment