Skip to content

Commit acb2cb0

Browse files
formatting
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d503c3c commit acb2cb0

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

ext/DynamicPPLJETExt.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function DynamicPPL.determine_varinfo(
3333
model::DynamicPPL.Model,
3434
context::DynamicPPL.AbstractContext=DynamicPPL.DefaultContext();
3535
verbose::Bool=false,
36-
only_tilde::Bool=true
36+
only_tilde::Bool=true,
3737
)
3838
# First we try with the typed varinfo.
3939
varinfo = DynamicPPL.typed_varinfo(model)
@@ -88,4 +88,3 @@ function DynamicPPL.determine_varinfo(
8888
end
8989

9090
end
91-

test/ext/DynamicPPLJETExt.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
end
1010
end
1111
model = demo1()
12-
@test DynamicPPL.determine_varinfo(model; verbose=true) isa DynamicPPL.UntypedVarInfo
12+
@test DynamicPPL.determine_varinfo(model; verbose=true) isa
13+
DynamicPPL.UntypedVarInfo
1314

1415
@model demo2() = x ~ Normal()
1516
@test DynamicPPL.determine_varinfo(demo2()) isa DynamicPPL.TypedVarInfo
@@ -24,7 +25,8 @@
2425
z ~ Normal()
2526
end
2627
end
27-
@test DynamicPPL.determine_varinfo(demo3(); verbose=true) isa DynamicPPL.UntypedVarInfo
28+
@test DynamicPPL.determine_varinfo(demo3(); verbose=true) isa
29+
DynamicPPL.UntypedVarInfo
2830

2931
# Evaluation works (and it would even do so in practice), but sampling
3032
# fill fail due to storing `Cauchy{Float64}` in `Vector{Normal{Float64}}`.
@@ -36,7 +38,8 @@
3638
y ~ Cauchy() # different distibution, but same transformation => should work
3739
end
3840
end
39-
@test DynamicPPL.determine_varinfo(demo4(); verbose=true) isa DynamicPPL.UntypedVarInfo
41+
@test DynamicPPL.determine_varinfo(demo4(); verbose=true) isa
42+
DynamicPPL.UntypedVarInfo
4043

4144
# In this model, the type error occurs in the user code rather than in DynamicPPL.
4245
@model function demo5()
@@ -48,9 +51,11 @@
4851
return sum(xs)
4952
end
5053
# Should pass if we're only checking the tilde statements.
51-
@test DynamicPPL.determine_varinfo(demo5(); verbose=true) isa DynamicPPL.TypedVarInfo
54+
@test DynamicPPL.determine_varinfo(demo5(); verbose=true) isa
55+
DynamicPPL.TypedVarInfo
5256
# Should fail if we're including errors in the model body.
53-
@test DynamicPPL.determine_varinfo(demo5(); verbose=true, only_tilde=false) isa DynamicPPL.UntypedVarInfo
57+
@test DynamicPPL.determine_varinfo(demo5(); verbose=true, only_tilde=false) isa
58+
DynamicPPL.UntypedVarInfo
5459
end
5560

5661
@testset "demo models" begin

0 commit comments

Comments
 (0)