Skip to content

Commit

Permalink
dicts.bzl fix
Browse files Browse the repository at this point in the history
Summary:
Fix error message printing. When merging dicts failed because of non-equal, duplicate entries, the failure message would fail to print.

It would error that the format string was invalid in the the failure, not the actual error message

Reviewed By: IanChilds

Differential Revision: D66457797

fbshipit-source-id: 609cf0b41ab0e8037c1fa542951d6a122ff14ade
  • Loading branch information
Dustin Toff authored and facebook-github-bot committed Nov 26, 2024
1 parent fba080f commit 9f4f0c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prelude/utils/dicts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

load("@prelude//utils:expect.bzl", "expect")

_DEFAULT_FMT = "found different values for key \"{0}\": {} != {}"
_DEFAULT_FMT = "found different values for key \"{}\": {} != {}"

def update_x(dst: dict[typing.Any, typing.Any], k: typing.Any, v: typing.Any, fmt = _DEFAULT_FMT):
p = dst.setdefault(k, v)
Expand Down

0 comments on commit 9f4f0c2

Please sign in to comment.