Skip to content

Commit c701b04

Browse files
committed
fix formatting
1 parent c777d34 commit c701b04

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

src/FileDFG/services/FileDFG.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ function loadDFG!(
119119
variablefiles = readdir(joinpath(loaddir, "variables"); sort = false, join = true)
120120

121121
# type instability on `variables` as either `::Vector{Variable}` or `::Vector{VariableCompute{<:}}` (vector of abstract)
122-
variables = @showprogress dt=1 desc = "loading variables" asyncmap(variablefiles) do file
122+
variables = @showprogress dt=1 desc = "loading variables" asyncmap(
123+
variablefiles,
124+
) do file
123125
v = JSON.parsefile(file, V; style = DFGJSONStyle())
124126
return addVariable!(dfgLoadInto, v)
125127
end
@@ -170,7 +172,7 @@ function loadDFG(file::AbstractString)
170172
loaddir = Tar.extract(hdr -> contains(hdr.path, dfgnodenames), tar)
171173
close(tar)
172174

173-
progess = Progress(4; desc="Loading DFG Nodes")
175+
progess = Progress(4; desc = "Loading DFG Nodes")
174176
agent = JSON.parsefile(joinpath(loaddir, "agent.json"), Agent; style = DFGJSONStyle())
175177
next!(progess)
176178
graph = JSON.parsefile(

src/services/AbstractDFG.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,7 @@ function deepcopyGraph(
549549
graphLabel::Symbol = Symbol(getGraphLabel(sourceDFG), "_cp_$(string(uuid4())[1:6])"),
550550
kwargs...,
551551
) where {T <: AbstractDFG}
552-
553-
destDFG = T(; graph=sourceDFG.graph, agent=sourceDFG.agent, graphLabel)
552+
destDFG = T(; graph = sourceDFG.graph, agent = sourceDFG.agent, graphLabel)
554553
copyGraph!(
555554
destDFG,
556555
sourceDFG,

src/services/CommonAccessors.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ Variables or factors may or may not be 'solvable', depending on a user definitio
4848
Related:
4949
- isSolveInProgress
5050
"""
51-
getSolvable(node::Union{VariableDFG, VariableSummary, FactorDFG, FactorSummary}) = node.solvable[]
51+
function getSolvable(node::Union{VariableDFG, VariableSummary, FactorDFG, FactorSummary})
52+
return node.solvable[]
53+
end
5254

5355
"""
5456
$SIGNATURES

src/services/CompareUtils.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,9 @@ function compareFactor(
348348
end
349349
@debug "compareFactor 5/5" TP
350350
#FIXME is varidx stil in use and should it be checked
351-
if !(:varidx in skip) && hasfield(typeof(getCache(A)), :varidx) &&
352-
getCache(A).varidx isa Base.RefValue
351+
if !(:varidx in skip) &&
352+
hasfield(typeof(getCache(A)), :varidx) &&
353+
getCache(A).varidx isa Base.RefValue
353354
TP =
354355
TP & (
355356
skipcompute || compareAll(

test/testBlocks.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,9 @@ function testGroup!(fg, v1, v2, f0, f1)
10081008
@test_skip varNearTs[1][1] == [:b]
10091009

10101010
## SORT copied from CRUD
1011-
@test all(getVariables(fg; labelFilter = contains(r"a")) .== [getVariable(fg, v1.label)])
1011+
@test all(
1012+
getVariables(fg; labelFilter = contains(r"a")) .== [getVariable(fg, v1.label)],
1013+
)
10121014
@test all(getVariables(fg; solvableFilter = >=(1)) .== [getVariable(fg, v2.label)])
10131015
@test getVariables(fg; labelFilter = contains(r"a"), solvableFilter = >=(1)) == []
10141016
@test getVariables(fg; tagsFilter = ([:LANDMARK]))[1] == getVariable(fg, v2.label)
@@ -1033,7 +1035,10 @@ function testGroup!(fg, v1, v2, f0, f1)
10331035

10341036
# Tags
10351037
@test ls(fg; tagsFilter = ([:POSE])) == []
1036-
@test issetequal(ls(fg; tagsFilter = !isdisjoint([:POSE, :LANDMARK])), ls(fg; tagsFilter = ([:VARIABLE])))
1038+
@test issetequal(
1039+
ls(fg; tagsFilter = !isdisjoint([:POSE, :LANDMARK])),
1040+
ls(fg; tagsFilter = ([:VARIABLE])),
1041+
)
10371042

10381043
@test lsf(fg; tagsFilter = !isdisjoint([:NONE])) == []
10391044
@test lsf(fg; tagsFilter = ([:NONE])) == []
@@ -1297,7 +1302,10 @@ function GettingNeighbors(testDFGAPI; VARTYPE = VariableCompute, FACTYPE = Facto
12971302
#TODO if not a GraphsDFG with and summary or skeleton
12981303
if VARTYPE == VariableCompute
12991304
@test listNeighbors(dfg, :x5; solvableFilter = >=(2)) == Symbol[]
1300-
@test issetequal(listNeighbors(dfg, :x5; solvableFilter = >=(0)), [:x4x5f1, :x5x6f1])
1305+
@test issetequal(
1306+
listNeighbors(dfg, :x5; solvableFilter = >=(0)),
1307+
[:x4x5f1, :x5x6f1],
1308+
)
13011309
@test issetequal(listNeighbors(dfg, :x5), [:x4x5f1, :x5x6f1])
13021310
@test listNeighbors(dfg, :x7x8f1; solvableFilter = >=(0)) == [:x7, :x8]
13031311
@test listNeighbors(dfg, :x7x8f1; solvableFilter = >=(1)) == [:x7]

0 commit comments

Comments
 (0)