Skip to content

Commit

Permalink
use value constructor, not match pattern, to build return value
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Jan 23, 2025
1 parent de94bda commit 9af764f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion looptrace/trace_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def proc1(key: str, value: object) -> Result[TraceGroup, Errors]:
def combine(state: Result[set[TraceGroup], Errors], new_result: Result[TraceGroup, Errors]) -> Result[set[TraceGroup], Errors]:
match state, new_result:
case result.Result(tag="error", error=old_messages), result.Result(tag="error", error=new_messages):
return result.Result(Seq.of_iterable(concat(old_messages, new_messages)))
return Result(Seq.of_iterable(concat(old_messages, new_messages)))
case _, _:
return state.map2(new_result, lambda groups, new_group: groups + new_group)

Expand Down

0 comments on commit 9af764f

Please sign in to comment.