Skip to content

Commit a8603e2

Browse files
AffieCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 98f6502 commit a8603e2

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/Deprecated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ end
129129

130130
function getVariableTypeName(v::VariableSummary)
131131
Base.depwarn("getVariableTypeName is deprecated.", :getVariableTypeName)
132-
return v.statekindsymbol
132+
return v.statekind
133133
end
134134

135135
function getMetadata(dfg::AbstractDFG, label::Symbol, key::Symbol)

src/serialization/StateSerialization.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function lowerStateKind(varT::AbstractStateType{N}) where {N}
1414
else
1515
throw(
1616
SerializationError(
17-
"Serializing Variable State type only supports an integer parameter, got '$(T)'.",
17+
"Serializing Variable State type only supports an integer parameter, got '$(N)'.",
1818
),
1919
)
2020
end
@@ -128,7 +128,7 @@ function unpackOldState(d)
128128

129129
#
130130
label = Symbol(d.solveKey)
131-
!isempty(d.covar) && error("covar field is not suppoted")
131+
!isempty(d.covar) && error("covar field is not supported")
132132
if label == :parametric
133133
belief =
134134
BeliefRepresentation(GaussianDensityKind(), T; means = vals, covariances = [BW])

src/services/CustomPrinting.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ function printVariable(
5959
println(ioc, " marginalized: ", isMarginalized(vert, :default))
6060
println(ioc, " size bel. samples: ", size(vnd.belief.points))
6161
print(ioc, " kde bandwidths: ")
62-
if 0 < length(vnd.belief.bandwidth)
63-
println(ioc, round.(vnd.belief.bandwidth; digits = 4))
62+
bandwidth = vnd.belief.bandwidth
63+
if !isnothing(bandwidth) && 0 < length(bandwidth)
64+
println(ioc, round.(bandwidth; digits = 4))
6465
end
6566
printstyled(ioc, " VNDs: "; bold = true)
6667
println(ioc, solk[smsk], 4 < lsolk ? "..." : "")

0 commit comments

Comments
 (0)