Skip to content

Commit

Permalink
fix ordering of kwargs
Browse files Browse the repository at this point in the history
thanks @davidstone for the report
  • Loading branch information
scheibo committed Jan 28, 2024
1 parent 5a9ef2c commit d146525
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion anon/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function anonymize(
const combine = (a: string[]) => {
const buf = `|${a.join('|')}`;
const kws: string[] = [];
for (const k in kwArgs) {
for (const k of Object.keys(kwArgs).reverse()) {
let v = kwArgs[k as keyof typeof kwArgs] as any;

if (k === 'of') {
Expand Down
2 changes: 1 addition & 1 deletion anon/src/testdata/anon.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"|",
"|detailschange|p2a: Rayquaza|Rayquaza-Mega",
"|-mega|p2a: Rayquaza|Rayquaza|",
"|-weather|DeltaStream|[of] p2a: Rayquaza|[from] ability: Delta Stream",
"|-weather|DeltaStream|[from] ability: Delta Stream|[of] p2a: Rayquaza",
"|move|p2a: Rayquaza|Dragon Ascent|p1a: Darmanitan",
"|-damage|p1a: Darmanitan|0 fnt",
"|-unboost|p2a: Rayquaza|def|1",
Expand Down
2 changes: 1 addition & 1 deletion anon/src/testdata/salt.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"|",
"|detailschange|p2a: 64bd07b346|Rayquaza-Mega",
"|-mega|p2a: 64bd07b346|Rayquaza|",
"|-weather|DeltaStream|[of] p2a: 64bd07b346|[from] ability: Delta Stream",
"|-weather|DeltaStream|[from] ability: Delta Stream|[of] p2a: 64bd07b346",
"|move|p2a: 64bd07b346|Dragon Ascent|p1a: 544459d148",
"|-damage|p1a: 544459d148|0 fnt",
"|-unboost|p2a: 64bd07b346|def|1",
Expand Down

0 comments on commit d146525

Please sign in to comment.