Skip to content

Commit

Permalink
minor simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
omry committed Apr 23, 2020
1 parent e3baa45 commit 1aed8a3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions omegaconf/dictconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ def _validate_set_merge_impl(self, key: Any, value: Any, is_assign: bool) -> Non
from omegaconf import OmegaConf

vk = get_value_kind(value)
if vk == ValueKind.INTERPOLATION:
return
if isinstance(value, (str, ValueNode)) and vk == ValueKind.STR_INTERPOLATION:
if vk in (ValueKind.INTERPOLATION, ValueKind.STR_INTERPOLATION):
return

if OmegaConf.is_none(value):
Expand All @@ -157,10 +155,6 @@ def _validate_set_merge_impl(self, key: Any, value: Any, is_assign: bool) -> Non
if value == "???":
return

# validate get
if key is not None:
self._validate_get(key, value)

target: Optional[Node]
if key is None:
target = self
Expand Down Expand Up @@ -248,7 +242,6 @@ def _s_validate_and_normalize_key(
assert False

def __setitem__(self, key: Union[str, Enum], value: Any) -> None:

try:
self.__set_impl(key=key, value=value)
except AttributeError as e:
Expand Down

0 comments on commit 1aed8a3

Please sign in to comment.