Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ paths are considered internals and can change in minor and patch releases.
v4.45.0 (unreleased)
--------------------

Fixed
^^^^^
- Overrides for nested keys in dict. Issue (`#823
<https://github.com/omni-us/jsonargparse/issues/823>`__).
- ``Issue-823`` (`#824
<https://github.com/omni-us/jsonargparse/pull/824>`__).

Added
^^^^^
- Signature methods now when given ``sub_configs=True``, list of paths types can
Expand Down
6 changes: 5 additions & 1 deletion jsonargparse/_typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,11 @@ def adapt_typehints(
elif typehint_origin in mapping_origin_types:
if isinstance(val, NestedArg):
if isinstance(prev_val, dict):
val = {**prev_val, val.key: val.val}
if isinstance(val.key, str) and "." in val.key:
key_prefix, key_suffix = val.key.split(".", 1)
val = {**prev_val, key_prefix: {key_suffix: val.val}}
else:
val = {**prev_val, val.key: val.val}
else:
val = {val.key: val.val}
elif isinstance(val, MappingProxyType):
Expand Down