From 64984044d80606932bf12038c2fe3b00ec334584 Mon Sep 17 00:00:00 2001 From: bvdmitri <6557701+bvdmitri@users.noreply.github.com> Date: Mon, 13 Jul 2026 09:49:40 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Auto-format=20Julia=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/annotations/input_arguments.jl | 8 +++-- src/helpers/macrohelpers.jl | 5 +-- src/nodes/predefined/continuous_transition.jl | 2 +- src/nodes/predefined/probit.jl | 2 +- test/annotations/input_arguments_tests.jl | 36 +++++++++++++++---- 5 files changed, 41 insertions(+), 12 deletions(-) diff --git a/src/annotations/input_arguments.jl b/src/annotations/input_arguments.jl index 4cc4f36f8..b1328ec3d 100644 --- a/src/annotations/input_arguments.jl +++ b/src/annotations/input_arguments.jl @@ -126,9 +126,13 @@ function post_product_annotations!( _merge_input_arguments(left_record, right_record), ) elseif has_left - annotate!(merged, :rule_input_arguments, get_rule_input_arguments(left_ann)) + annotate!( + merged, :rule_input_arguments, get_rule_input_arguments(left_ann) + ) elseif has_right - annotate!(merged, :rule_input_arguments, get_rule_input_arguments(right_ann)) + annotate!( + merged, :rule_input_arguments, get_rule_input_arguments(right_ann) + ) end return nothing end diff --git a/src/helpers/macrohelpers.jl b/src/helpers/macrohelpers.jl index 2c1677a47..1c033b31a 100644 --- a/src/helpers/macrohelpers.jl +++ b/src/helpers/macrohelpers.jl @@ -115,8 +115,9 @@ macro test_inferred(T, expression) quote let local result = Test.@inferred($expression) - if !(ReactiveMP.MacroHelpers.__test_inferred_typeof(result) <: - $T) + if !( + ReactiveMP.MacroHelpers.__test_inferred_typeof(result) <: $T + ) error( "Result type $(ReactiveMP.MacroHelpers.__test_inferred_typeof(result)) does not match allowed type $T", ) diff --git a/src/nodes/predefined/continuous_transition.jl b/src/nodes/predefined/continuous_transition.jl index 1c3be0278..cb40a8fd9 100644 --- a/src/nodes/predefined/continuous_transition.jl +++ b/src/nodes/predefined/continuous_transition.jl @@ -95,7 +95,7 @@ default_meta(::Type{CTMeta}) = error("ContinuousTransition node requires meta flag explicitly specified") default_functional_dependencies(::Type{<:ContinuousTransition}) = - RequireMarginalFunctionalDependencies(a = nothing) + RequireMarginalFunctionalDependencies(; a = nothing) """ `ctcompanion_matrix` casts a vector `a` into a matrix `A` by means of linearization of the transformation function `f` around the expansion point `a0`. diff --git a/src/nodes/predefined/probit.jl b/src/nodes/predefined/probit.jl index 174b6ec6e..931b2c5e2 100644 --- a/src/nodes/predefined/probit.jl +++ b/src/nodes/predefined/probit.jl @@ -17,7 +17,7 @@ ProbitMeta(; p = 32) = ProbitMeta(p) default_meta(::Type{Probit}) = ProbitMeta(32) default_functional_dependencies(::Type{<:Probit}) = - RequireMessageFunctionalDependencies(in = NormalMeanPrecision(0.0, 100.0)) + RequireMessageFunctionalDependencies(; in = NormalMeanPrecision(0.0, 100.0)) @average_energy Probit ( q_out::Union{PointMass, Bernoulli}, diff --git a/test/annotations/input_arguments_tests.jl b/test/annotations/input_arguments_tests.jl index 78435ef4e..5812cf80e 100644 --- a/test/annotations/input_arguments_tests.jl +++ b/test/annotations/input_arguments_tests.jl @@ -231,7 +231,10 @@ end has_annotation right_record = RuleInputArgumentsRecord( - RuleInputArgumentsTestUtils.MockMapping(:right), nothing, nothing, :right_result + RuleInputArgumentsTestUtils.MockMapping(:right), + nothing, + nothing, + :right_result, ) left_ann = AnnotationDict() # empty: represents a clamped/constant message, which never runs a rule @@ -239,7 +242,12 @@ end annotate!(right_ann, :rule_input_arguments, right_record) merged = post_product_annotations!( - (InputArgumentsAnnotations(),), left_ann, right_ann, nothing, nothing, nothing + (InputArgumentsAnnotations(),), + left_ann, + right_ann, + nothing, + nothing, + nothing, ) @test has_annotation(merged, :rule_input_arguments) @@ -259,7 +267,10 @@ end has_annotation left_record = RuleInputArgumentsRecord( - RuleInputArgumentsTestUtils.MockMapping(:left), nothing, nothing, :left_result + RuleInputArgumentsTestUtils.MockMapping(:left), + nothing, + nothing, + :left_result, ) left_ann = AnnotationDict() @@ -267,7 +278,12 @@ end annotate!(left_ann, :rule_input_arguments, left_record) merged = post_product_annotations!( - (InputArgumentsAnnotations(),), left_ann, right_ann, nothing, nothing, nothing + (InputArgumentsAnnotations(),), + left_ann, + right_ann, + nothing, + nothing, + nothing, ) @test has_annotation(merged, :rule_input_arguments) @@ -278,13 +294,21 @@ end RuleInputArgumentsTestUtils ] begin import ReactiveMP: - AnnotationDict, post_product_annotations!, InputArgumentsAnnotations, has_annotation + AnnotationDict, + post_product_annotations!, + InputArgumentsAnnotations, + has_annotation left_ann = AnnotationDict() right_ann = AnnotationDict() merged = post_product_annotations!( - (InputArgumentsAnnotations(),), left_ann, right_ann, nothing, nothing, nothing + (InputArgumentsAnnotations(),), + left_ann, + right_ann, + nothing, + nothing, + nothing, ) @test !has_annotation(merged, :rule_input_arguments)