Skip to content

Commit

Permalink
apply linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigot committed Sep 1, 2024
1 parent 8e0124e commit f9538d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/parse-functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ function isnls(nlp)
expr_tree = ExpressionTreeForge.get_expression_tree(nlp)
F_expr = ExpressionTreeForge.extract_element_functions(expr_tree)
test_square(expr) = expr.field == ExpressionTreeForge.M_power_operator.Power_operator{Int}(2)
is_nls = mapreduce(test_square, &, F_expr) :: Bool
return is_nls
end
is_nls = mapreduce(test_square, &, F_expr)::Bool
return is_nls
end
11 changes: 6 additions & 5 deletions test/parse-function-test.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
problems_names = meta[!,:name][1:50] # we test only the 50 first problems
problems_symbols = map(name -> OptimizationProblems.ADNLPProblems.eval(Meta.parse(name)), problems_names)
problems_names = meta[!, :name][1:50] # we test only the 50 first problems
problems_symbols =
map(name -> OptimizationProblems.ADNLPProblems.eval(Meta.parse(name)), problems_names)

@testset "NLS from NLP" begin
result_list_isnls = Bool[]
Expand All @@ -12,11 +13,11 @@ problems_symbols = map(name -> OptimizationProblems.ADNLPProblems.eval(Meta.pars
@test detect_nls == is_nls
@debug "Least squares objective, $index : $problem"
# detect_nls != is_nls && (@debug "$index : $problem")
else
else
@debug "Not least squares objective, $index : $problem"
end
catch
catch
@debug "the $index-th $(problems_names[index]) problem is unsupported."
end
end
end
end

0 comments on commit f9538d7

Please sign in to comment.