Skip to content

Commit

Permalink
remove unnecessary assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
pereman2 committed Dec 20, 2020
1 parent 90589a4 commit 09a59fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions omegaconf/listconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,14 @@ def append(self, item: Any) -> None:
self._validate_set(key=index, value=item)

element_type = self.__dict__["_metadata"].element_type
value = item
expect_container = is_container_annotation(element_type)
if expect_container and isinstance(item, BaseContainer):
value = item._value()
item = item._value()

node = _maybe_wrap(
ref_type=self.__dict__["_metadata"].element_type,
key=index,
value=value,
value=item,
is_optional=OmegaConf.is_optional(item),
parent=self,
)
Expand Down

0 comments on commit 09a59fa

Please # to comment.