Skip to content

Commit

Permalink
comment 2
Browse files Browse the repository at this point in the history
  • Loading branch information
omry committed Mar 2, 2021
1 parent bd41b67 commit 3b2167e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hydra/core/override_parser/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ def get_prefix() -> str:
return "~"
elif self.is_add():
return "+"
elif self.is_force_add():
return "++"
else:
return ""

Expand Down
3 changes: 3 additions & 0 deletions tests/test_overrides_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,9 @@ def test_parse_overrides() -> None:
# add
pytest.param("+key=value", "+key", id="+key"),
pytest.param("+key@pkg1=value", "+key@pkg1", id="+key@pkg1"),
# force-add
pytest.param("++key=value", "++key", id="++key"),
pytest.param("++key@pkg1=value", "++key@pkg1", id="++key@pkg1"),
# del
pytest.param("~key=value", "~key", id="~key"),
pytest.param("~key@pkg1=value", "~key@pkg1", id="~key@pkg1"),
Expand Down

0 comments on commit 3b2167e

Please sign in to comment.