Skip to content

Commit

Permalink
fix dict update
Browse files Browse the repository at this point in the history
fix "check: whether a new key is allowed to add into target_dict"
  • Loading branch information
wwxFromTju committed Jul 20, 2023
1 parent 521316d commit be796b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion marllib/marl/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def dict_update(target_dict: Dict, new_dict: Dict, check: bool = False) -> Dict:
raise ValueError("{} illegal, not in default config".format(key))
else: # update
target_dict[key] = value
if key in target_dict:
else:
target_dict[key] = value

return target_dict
Expand Down

0 comments on commit be796b5

Please sign in to comment.