Skip to content

Commit 76aebc5

Browse files
committed
formatting
1 parent f716296 commit 76aebc5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/context_implementations.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ probability of `vi` with the returned value.
105105
function tilde_assume!!(context, right, vn, vi)
106106
return if is_rhs_model(right)
107107
# Prefix the variables using the `vn`.
108-
rand_like!!(right, should_auto_prefix(right) ? PrefixContext{Symbol(vn)}(context) : context, vi)
108+
rand_like!!(
109+
right,
110+
should_auto_prefix(right) ? PrefixContext{Symbol(vn)}(context) : context,
111+
vi,
112+
)
109113
else
110114
value, logp, vi = tilde_assume(context, right, vn, vi)
111115
value, acclogp_assume!!(context, vi, logp)
@@ -338,11 +342,11 @@ Falls back to `dot_tilde_assume(context, right, left, vn, vi)`.
338342
function dot_tilde_assume!!(context, right, left, vn, vi)
339343
is_rhs_model(right) && throw(
340344
ArgumentError(
341-
"`.~` with a model on the right-hand side is not supported; please use `~`",
345+
"`.~` with a model on the right-hand side is not supported; please use `~`"
342346
),
343347
)
344348
value, logp, vi = dot_tilde_assume(context, right, left, vn, vi)
345-
value, acclogp_assume!!(context, vi, logp)
349+
return value, acclogp_assume!!(context, vi, logp)
346350
end
347351

348352
# `dot_assume`

src/model.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,4 +1485,5 @@ julia> model()
14851485
ERROR: ArgumentError: `~` with a model on the right-hand side of an observe statement is not supported
14861486
[...]
14871487
"""
1488-
to_submodel(model::Model, auto_prefix::Bool=true) = to_sampleable(returned(model), auto_prefix)
1488+
to_submodel(model::Model, auto_prefix::Bool=true) =
1489+
to_sampleable(returned(model), auto_prefix)

0 commit comments

Comments
 (0)