Skip to content

Commit c657da8

Browse files
committed
style(s030): the formatter converges once the map is bound before the call
Signed-off-by: Ayla Croft <aylacroft@proton.me>
1 parent fccfc8b commit c657da8

2 files changed

Lines changed: 45 additions & 45 deletions

File tree

‎test/trinity/memory/prompt_tiers_test.exs‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,31 @@ defmodule Trinity.Memory.PromptTiersTest do
6969
scope = Receipts.session_scope(row.id)
7070
on_exit(fn -> Receipts.stop_writer(scope) end)
7171

72-
{:ok, _} =
73-
AlwaysOn.add(
74-
%{
75-
persona_id: persona.id,
76-
tier: "always_on",
77-
scope: AlwaysOn.persona_scope(persona.id),
78-
key: "before",
79-
body: "known at start"
80-
}, by: "test")
72+
attrs = %{
73+
persona_id: persona.id,
74+
tier: "always_on",
75+
scope: AlwaysOn.persona_scope(persona.id),
76+
key: "before",
77+
body: "known at start"
78+
}
79+
80+
{:ok, _} = AlwaysOn.add(attrs, by: "test")
8181

8282
Fake.scripts([script_deltas(1, "ok "), script_deltas(1, "ok "), script_deltas(1, "ok ")])
8383
{:ok, pid} = start_drained(row.id)
8484
{:ok, _} = Session.send_user_message(pid, "one")
8585
_ = collect(row.id, &match?({:state, :idle}, &1))
8686
assert Fake.last_request().system =~ "- before: known at start"
8787

88-
{:ok, _} =
89-
AlwaysOn.add(
90-
%{
91-
persona_id: persona.id,
92-
tier: "always_on",
93-
scope: AlwaysOn.persona_scope(persona.id),
94-
key: "later",
95-
body: "added mid-session"
96-
}, by: "test")
88+
attrs = %{
89+
persona_id: persona.id,
90+
tier: "always_on",
91+
scope: AlwaysOn.persona_scope(persona.id),
92+
key: "later",
93+
body: "added mid-session"
94+
}
95+
96+
{:ok, _} = AlwaysOn.add(attrs, by: "test")
9797

9898
{:ok, _} = Session.send_user_message(pid, "two")
9999
_ = collect(row.id, &match?({:state, :idle}, &1))
@@ -128,15 +128,15 @@ defmodule Trinity.Memory.PromptTiersTest do
128128
a = Factory.persona!(%{soul: "# Alpha\nYou are the alpha persona."})
129129
b = Factory.persona!(%{soul: "# Beta\nYou are the beta persona."})
130130

131-
{:ok, _} =
132-
AlwaysOn.add(
133-
%{
134-
persona_id: b.id,
135-
tier: "profile",
136-
scope: AlwaysOn.persona_scope(b.id),
137-
key: "name",
138-
body: "Bea"
139-
}, by: "test")
131+
attrs = %{
132+
persona_id: b.id,
133+
tier: "profile",
134+
scope: AlwaysOn.persona_scope(b.id),
135+
key: "name",
136+
body: "Bea"
137+
}
138+
139+
{:ok, _} = AlwaysOn.add(attrs, by: "test")
140140

141141
sa = Factory.session!(%{persona_id: a.id})
142142
sb = Factory.session!(%{persona_id: b.id})

‎test/trinity_web/live/memory_pages_test.exs‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ defmodule TrinityWeb.MemoryPagesTest do
8686
on_exit(fn -> Application.put_env(:trinity, :memory, old) end)
8787
pscope = AlwaysOn.persona_scope(persona.id)
8888

89-
{:ok, _} =
90-
AlwaysOn.add(
91-
%{
92-
persona_id: persona.id,
93-
tier: "always_on",
94-
scope: pscope,
95-
key: "a",
96-
body: String.duplicate("alpha ", 8)
97-
}, by: "test")
89+
attrs = %{
90+
persona_id: persona.id,
91+
tier: "always_on",
92+
scope: pscope,
93+
key: "a",
94+
body: String.duplicate("alpha ", 8)
95+
}
96+
97+
{:ok, _} = AlwaysOn.add(attrs, by: "test")
9898

9999
Fake.object(%{
100100
"entries" => [
@@ -107,15 +107,15 @@ defmodule TrinityWeb.MemoryPagesTest do
107107
]
108108
})
109109

110-
{:ok, _} =
111-
AlwaysOn.add(
112-
%{
113-
persona_id: persona.id,
114-
tier: "always_on",
115-
scope: pscope,
116-
key: "b",
117-
body: String.duplicate("beta ", 8)
118-
}, by: "test")
110+
attrs = %{
111+
persona_id: persona.id,
112+
tier: "always_on",
113+
scope: pscope,
114+
key: "b",
115+
body: String.duplicate("beta ", 8)
116+
}
117+
118+
{:ok, _} = AlwaysOn.add(attrs, by: "test")
119119

120120
[proposal] = Consolidator.pending(persona.id)
121121

0 commit comments

Comments
 (0)