Refactor is_unary and p_kw, improve consistency of kwarg parenthesisation#1011
Conversation
|
!formatbot SciML/OrdinaryDiffEq.jl style=sciml |
|
ok that repo is too big |
|
!formatbot SciML/SciMLSensitivity.jl style=sciml |
FormatBot Results
Error: Formatting with PR failed. See workflow run. |
|
!formatbot SciML/SciMLSensitivity.jl style=sciml |
FormatBot Results
Diff (5753 bytes)diff --git a/src/nilss.jl b/src/nilss.jl
index f1688e6..6e51f2d 100644
--- a/src/nilss.jl
+++ b/src/nilss.jl
@@ -1,8 +1,8 @@
struct NILSSSensitivityFunction{
- iip, F, Alg,
- PGPU, PGPP, CONFU, CONGP, DGVAL, DG1, DG2, jType, RefType,
- } <:
- AbstractODEFunction{iip}
+ iip, F, Alg,
+ PGPU, PGPP, CONFU, CONGP, DGVAL, DG1, DG2, jType, RefType
+} <:
+ AbstractODEFunction{iip}
f::F
alg::Alg
numparams::Int
@@ -22,10 +22,10 @@ function NILSSSensitivityFunction(
sensealg, f, u0, p, tspan, g, dgdu, dgdp,
jevery = nothing,
cur_time = nothing
- )
+)
!(
f.mass_matrix isa UniformScaling ||
- f.mass_matrix isa Tuple{UniformScaling, UniformScaling}
+ f.mass_matrix isa Tuple{UniformScaling, UniformScaling}
) &&
throw(SHADOWING_DAE_ERROR())
@@ -61,7 +61,7 @@ function NILSSSensitivityFunction(
typeof(pgpu), typeof(pgpp), typeof(pgpu_config),
typeof(pgpp_config), typeof(dg_val), typeof(dgdu),
typeof(dgdp),
- typeof(jevery), typeof(cur_time),
+ typeof(jevery), typeof(cur_time)
}(
f, sensealg, numparams,
numindvar, pgpu, pgpp,
@@ -72,12 +72,12 @@ function NILSSSensitivityFunction(
end
struct NILSSProblem{
- A, CacheType, FSprob, probType, u0Type, vstar0Type, w0Type,
- TType, dtType, gType, yType, vstarType,
- wType, RType, bType, weightType, CType, dType, BType, aType, vType,
- xiType,
- G, resType,
- }
+ A, CacheType, FSprob, probType, u0Type, vstar0Type, w0Type,
+ TType, dtType, gType, yType, vstarType,
+ wType, RType, bType, weightType, CType, dType, BType, aType, vType,
+ xiType,
+ G, resType
+}
sensealg::A
diffcache::CacheType
forward_prob::FSprob
@@ -115,7 +115,7 @@ function NILSSProblem(
t = nothing, dgdu_discrete = nothing, dgdp_discrete = nothing,
dgdu_continuous = nothing, dgdp_continuous = nothing, g = sensealg.g,
kwargs...
- )
+)
(; f, p, u0, tspan) = prob
(; nseg, nstep, nus, rng) = sensealg #number of segments on time interval, number of steps saved on each segment
@@ -157,9 +157,9 @@ function NILSSProblem(
cur_time = nothing
@assert dgdu_discrete === nothing && dgdp_discrete === nothing
dgdu = dgdu_continuous === nothing ? dgdu_continuous :
- (out, u, p, t, i) -> dgdu_continuous(out, u, p, t)
+ (out, u, p, t, i) -> dgdu_continuous(out, u, p, t)
dgdp = dgdp_continuous === nothing ? dgdp_continuous :
- (out, u, p, t, i) -> dgdp_continuous(out, u, p, t)
+ (out, u, p, t, i) -> dgdp_continuous(out, u, p, t)
end
# inhomogeneous forward sensitivity problem
@@ -242,7 +242,7 @@ function NILSSProblem(
typeof(w), typeof(R),
typeof(b), typeof(weight), typeof(Cinv), typeof(d), typeof(B), typeof(a),
typeof(v), typeof(ξ),
- typeof(g), typeof(res),
+ typeof(g), typeof(res)
}(
sensealg, sense, forward_prob, prob,
u0, vstar0, w0,
@@ -306,7 +306,7 @@ function forward_sense(prob::NILSSProblem, nilss::NILSS, alg)
#TODO determine a good dtsave (ΔT in paper, see Sec.4.2)
(;
nus, T_seg, dtsave, vstar, vstar_perp, w, w_perp, R, b, y,
- dudt, gsave, dgdu_val, forward_prob, u0, vstar0, w0,
+ dudt, gsave, dgdu_val, forward_prob, u0, vstar0, w0
) = prob
(; p, f) = forward_prob
(; S, sensealg) = f
@@ -470,7 +470,7 @@ function compute_Cinv!(Cinv, w_perp, weight, nseg, nus, indxp)
for iseg in 1:nseg
_C = @view Cinv[
((iseg - 1) * nus + 1):(iseg * nus),
- ((iseg - 1) * nus + 1):(iseg * nus),
+ ((iseg - 1) * nus + 1):(iseg * nus)
]
for i in 1:nus
wi = @view w_perp[:, :, iseg, i]
@@ -503,7 +503,7 @@ function compute_B!(B, R, nseg, nus, indxp)
for iseg in 1:(nseg - 1)
_B = @view B[
((iseg - 1) * nus + 1):(iseg * nus),
- ((iseg - 1) * nus + 1):(iseg * nus),
+ ((iseg - 1) * nus + 1):(iseg * nus)
]
_R = @view R[indxp, iseg, :, :]
copyto!(_B, -_R)
@@ -564,7 +564,7 @@ end
function accumulate_cost!(
_dgdu, u, p, t, sensealg::NILSS,
diffcache::NILSSSensitivityFunction, j
- )
+)
(; dgdu, dgdp, dg_val, pgpu, pgpu_config, pgpp, pgpp_config) = diffcache
if dgdu === nothing
@@ -596,7 +596,7 @@ function shadow_forward(prob::NILSSProblem, sensealg::NILSS, alg)
(; nseg, nstep) = sensealg
(;
res, nus, dtsave, vstar, vstar_perp, w, w_perp, R, b, dudt,
- gsave, dgdu_val, forward_prob, weight, Cinv, d, B, a, v, v_perp, ξ,
+ gsave, dgdu_val, forward_prob, weight, Cinv, d, B, a, v, v_perp, ξ
) = prob
(; numindvar, numparams) = forward_prob.f.S
@@ -628,7 +628,8 @@ function shadow_forward(prob::NILSSProblem, sensealg::NILSS, alg)
_dgdu = @view dgdu_val[:, :, iseg]
_v = @view v[:, :, iseg]
res[i] += sum((_v .* _dgdu) * _weight) / ((nstep - 1) * nseg)
- res[i] += ξ[iseg, end] * (gavg - gsave[end, iseg]) / (dtsave * (nstep - 1) * nseg)
+ res[i] += ξ[iseg, end] * (gavg - gsave[end, iseg]) /
+ (dtsave * (nstep - 1) * nseg)
end
end
@@ -636,5 +637,6 @@ function shadow_forward(prob::NILSSProblem, sensealg::NILSS, alg)
end
function check_for_g(sensealg::NILSS, g)
- return (g === nothing && error("To use NILSS, g must be passed as a kwarg to `NILSS(g=g)`."))
+ return (g === nothing &&
+ error("To use NILSS, g must be passed as a kwarg to `NILSS(g=g)`."))
end
|
|
okay that one is actually quite interesting because current release fails to format SciMLSens and so the diff is essentially comparing the unformatted main of SciMLSens vs the version formatted with this PR |
|
!formatbot SciML/Catalyst.jl style=sciml ignore=["test"] |
FormatBot Results
No formatting differences. |
|
!formatbot TuringLang/DynamicPPL.jl style=blue import_to_using=false ignore=["README.md"] |
FormatBot Results
Diff (8393 bytes)diff --git a/benchmarks/benchmarks.jl b/benchmarks/benchmarks.jl
index 4c260ce..b0cc858 100644
--- a/benchmarks/benchmarks.jl
+++ b/benchmarks/benchmarks.jl
@@ -242,7 +242,7 @@ function print_results(results)
(
name=is_tiny_primal(g.primal) ? "$(g.name)*" : g.name,
dim=format_dim(g.dim),
- linked=string(g.islinked),
+ linked=(string(g.islinked)),
primal=format_time(g.primal),
ratios,
)
@@ -353,7 +353,9 @@ function run(; markdown::Bool=false)
@info " errored: $(sprint(showerror, e))"
(model_dimension(model, islinked), missing, missing)
end
- push!(results, (; name, dim, adbackend=string(adbackend), islinked, t_logd, ratio))
+ push!(
+ results, (; name, dim, adbackend=(string(adbackend)), islinked, t_logd, ratio)
+ )
end
if markdown
println("```")
diff --git a/ext/DynamicPPLMCMCChainsExt.jl b/ext/DynamicPPLMCMCChainsExt.jl
index 7ae51ef..a19e5a6 100644
--- a/ext/DynamicPPLMCMCChainsExt.jl
+++ b/ext/DynamicPPLMCMCChainsExt.jl
@@ -421,8 +421,8 @@ Shared internal helper function.
function _pointwise_logdensities_chain(
model::DynamicPPL.Model,
chain::MCMCChains.Chains,
- ::Val{Prior}=Val(true),
- ::Val{Likelihood}=Val(true);
+ (::Val{Prior})=Val(true),
+ (::Val{Likelihood})=Val(true);
factorize=false,
) where {Prior,Likelihood}
acc = DynamicPPL.VNTAccumulator{DynamicPPL.POINTWISE_ACCNAME}(
diff --git a/src/accumulators/default.jl b/src/accumulators/default.jl
index 589823b..89388e8 100644
--- a/src/accumulators/default.jl
+++ b/src/accumulators/default.jl
@@ -177,7 +177,7 @@ function accumulate_observe!!(acc::LogLikelihoodAccumulator, right, left, vn, te
return acclogp(acc, Distributions.loglikelihood(right, left))
end
-function default_accumulators(::Type{FloatT}=LogProbType) where {FloatT}
+function default_accumulators((::Type{FloatT})=LogProbType) where {FloatT}
return AccumulatorTuple(
LogPriorAccumulator{FloatT}(),
LogJacobianAccumulator{FloatT}(),
diff --git a/src/accumulators/pointwise_logdensities.jl b/src/accumulators/pointwise_logdensities.jl
index c7ac611..6a7173c 100644
--- a/src/accumulators/pointwise_logdensities.jl
+++ b/src/accumulators/pointwise_logdensities.jl
@@ -108,8 +108,8 @@ or both).
function _pointwise_logdensities(
model::Model,
init_strat::AbstractInitStrategy,
- ::Val{Prior}=Val(true),
- ::Val{Likelihood}=Val(true);
+ (::Val{Prior})=Val(true),
+ (::Val{Likelihood})=Val(true);
factorize=false,
) where {Prior,Likelihood}
acc = VNTAccumulator{POINTWISE_ACCNAME}(PointwiseLogProb{Prior,Likelihood,factorize}())
diff --git a/src/test_utils/models.jl b/src/test_utils/models.jl
index c77bde7..8902357 100644
--- a/src/test_utils/models.jl
+++ b/src/test_utils/models.jl
@@ -74,7 +74,7 @@ x[4:5] ~ Dirichlet([1.0, 2.0])
```
"""
@model function demo_one_variable_multiple_constraints(
- ::Type{TV}=Vector{Float64}
+ (::Type{TV})=Vector{Float64}
) where {TV}
x = TV(undef, 5)
x[1] ~ Normal()
@@ -173,7 +173,9 @@ function _demo_logprior_true_with_logabsdet_jacobian(model, s, m)
return (s=s_unconstrained, m=m), logprior_true(model, s, m) - Δlogp
end
-@model function demo_dot_assume_observe(x=[1.5, 2.0], ::Type{TV}=Vector{Float64}) where {TV}
+@model function demo_dot_assume_observe(
+ x=[1.5, 2.0], (::Type{TV})=Vector{Float64}
+) where {TV}
# `dot_assume` and `observe`
s = TV(undef, length(x))
m = TV(undef, length(x))
@@ -199,7 +201,7 @@ function varnames(model::Model{typeof(demo_dot_assume_observe)})
end
@model function demo_assume_index_observe(
- x=[1.5, 2.0], ::Type{TV}=Vector{Float64}
+ x=[1.5, 2.0], (::Type{TV})=Vector{Float64}
) where {TV}
# `assume` with indexing and `observe`
s = TV(undef, length(x))
@@ -255,7 +257,7 @@ function varnames(model::Model{typeof(demo_assume_multivariate_observe)})
end
@model function demo_dot_assume_observe_index(
- x=[1.5, 2.0], ::Type{TV}=Vector{Float64}
+ x=[1.5, 2.0], (::Type{TV})=Vector{Float64}
) where {TV}
# `dot_assume` and `observe` with indexing
s = TV(undef, length(x))
@@ -335,7 +337,9 @@ function varnames(model::Model{typeof(demo_assume_multivariate_observe_literal)}
return [@varname(s), @varname(m)]
end
-@model function demo_dot_assume_observe_index_literal(::Type{TV}=Vector{Float64}) where {TV}
+@model function demo_dot_assume_observe_index_literal(
+ (::Type{TV})=Vector{Float64}
+) where {TV}
# `dot_assume` and literal `observe` with indexing
s = TV(undef, 2)
m = TV(undef, 2)
@@ -412,7 +416,7 @@ function varnames(model::Model{typeof(demo_assume_dot_observe_literal)})
end
# Only used as a submodel
-@model function _prior_dot_assume(::Type{TV}=Vector{Float64}) where {TV}
+@model function _prior_dot_assume((::Type{TV})=Vector{Float64}) where {TV}
s = TV(undef, 2)
s .~ InverseGamma(2, 3)
m = TV(undef, 2)
@@ -453,7 +457,7 @@ end
end
@model function demo_dot_assume_observe_submodel(
- x=[1.5, 2.0], ::Type{TV}=Vector{Float64}
+ x=[1.5, 2.0], (::Type{TV})=Vector{Float64}
) where {TV}
s = TV(undef, length(x))
s .~ InverseGamma(2, 3)
@@ -483,7 +487,7 @@ function varnames(model::Model{typeof(demo_dot_assume_observe_submodel)})
end
@model function demo_dot_assume_observe_matrix_index(
- x=transpose([1.5 2.0;]), ::Type{TV}=Vector{Float64}
+ x=transpose([1.5 2.0;]), (::Type{TV})=Vector{Float64}
) where {TV}
s = TV(undef, length(x))
s .~ InverseGamma(2, 3)
@@ -512,7 +516,7 @@ function varnames(model::Model{typeof(demo_dot_assume_observe_matrix_index)})
end
@model function demo_assume_matrix_observe_matrix_index(
- x=transpose([1.5 2.0;]), ::Type{TV}=Array{Float64}
+ x=transpose([1.5 2.0;]), (::Type{TV})=Array{Float64}
) where {TV}
n = length(x)
d = n ÷ 2
@@ -545,7 +549,7 @@ function varnames(model::Model{typeof(demo_assume_matrix_observe_matrix_index)})
end
@model function demo_nested_colons(
- x=(; data=[(; subdata=transpose([1.5 2.0;]))]), ::Type{TV}=Array{Float64}
+ x=(; data=[(; subdata=transpose([1.5 2.0;]))]), (::Type{TV})=Array{Float64}
) where {TV}
n = length(x.data[1].subdata)
d = n ÷ 2
diff --git a/test/compiler.jl b/test/compiler.jl
index 3d34594..fd19154 100644
--- a/test/compiler.jl
+++ b/test/compiler.jl
@@ -537,7 +537,7 @@ end
@test abs(mean([rand(m)[@varname(z)] for i in 1:10]) - 100) ≤ 10
# AR1 model. Dynamic prefixing.
- @model function AR1(num_steps, α, μ, σ, ::Type{TV}=Vector{Float64}) where {TV}
+ @model function AR1(num_steps, α, μ, σ, (::Type{TV})=Vector{Float64}) where {TV}
η ~ MvNormal(zeros(num_steps), I)
δ = sqrt(1 - α^2)
x = TV(undef, num_steps)
@@ -724,7 +724,7 @@ end
end
@testset "issue #393: anonymous argument with type parameter" begin
- @model f_393(::Val{ispredict}=Val(false)) where {ispredict} = ispredict ? 0 : 1
+ @model f_393((::Val{ispredict})=Val(false)) where {ispredict} = ispredict ? 0 : 1
@test f_393()() == 1
@test f_393(Val(true))() == 0
end
@@ -832,7 +832,7 @@ end
@testset "signature parsing + TypeWrap" begin
@model function demo_typewrap(
- a, b=1, ::Type{T1}=Float64; c, d=2, t::Type{T2}=Int
+ a, b=1, (::Type{T1})=Float64; c, d=2, t::Type{T2}=Int
) where {T1,T2}
return (; a, b, c, d, t)
end
diff --git a/test/varinfo.jl b/test/varinfo.jl
index 422f5dd..ad9fa36 100644
--- a/test/varinfo.jl
+++ b/test/varinfo.jl
@@ -312,7 +312,7 @@ end
end
@testset "link!! and invlink!!" begin
- @model gdemo(a, b, ::Type{T}=Float64) where {T} = begin
+ @model gdemo(a, b, (::Type{T})=Float64) where {T} = begin
s ~ InverseGamma(2, 3)
m ~ Uniform(0, 2)
x = Vector{T}(undef, length(a))
@@ -611,7 +611,7 @@ end
end
@testset "subset" begin
- @model function demo_subsetting_varinfo(::Type{TV}=Vector{Float64}) where {TV}
+ @model function demo_subsetting_varinfo((::Type{TV})=Vector{Float64}) where {TV}
s ~ InverseGamma(2, 3)
m ~ Normal(0, sqrt(s))
x = TV(undef, 2)
|
|
not a no-op, something is up with p_kw |
|
!formatbot TuringLang/DynamicPPL.jl style=blue import_to_using=false ignore=["README.md"] |
FormatBot Results
Diff (1856 bytes)diff --git a/docs/make.jl b/docs/make.jl
index 83380bd..7b713cb 100644
--- a/docs/make.jl
+++ b/docs/make.jl
@@ -62,7 +62,7 @@ makedocs(;
"Migrating old VarInfo code" => "migration.md",
"API" => "api.md",
],
- checkdocs=:exports,
+ checkdocs=(:exports),
doctest=false,
plugins=[links],
)
diff --git a/src/DynamicPPL.jl b/src/DynamicPPL.jl
index 3001210..bf7c0f9 100644
--- a/src/DynamicPPL.jl
+++ b/src/DynamicPPL.jl
@@ -298,7 +298,7 @@ if isdefined(Base.Experimental, :register_error_hint)
printstyled(
io,
"\n\n `$(exc.f)` requires MarginalLogDensities.jl to be loaded.\n Please run `using MarginalLogDensities` before calling `$(exc.f)`.\n";
- color=:cyan,
+ color=(:cyan),
bold=true,
)
end
diff --git a/src/accumulators.jl b/src/accumulators.jl
index 7f688cc..477ffbc 100644
--- a/src/accumulators.jl
+++ b/src/accumulators.jl
@@ -175,7 +175,7 @@ function pretty_print(io::IO, at::AccumulatorTuple, prefix::String)
tree_symbol = i == naccs ? "└─ " : "├─ "
key_name = string(name)
print(io, prefix * tree_symbol)
- printstyled(io, key_name; color=:cyan)
+ printstyled(io, key_name; color=(:cyan))
print(io, " => ")
show(io, acc)
if i < naccs
diff --git a/src/chains.jl b/src/chains.jl
index 0ad70fd..13a6e6c 100644
--- a/src/chains.jl
+++ b/src/chains.jl
@@ -231,7 +231,7 @@ function Base.show(io::IO, ::MIME"text/plain", pws::ParamsWithStats)
else
print(io, "\n ├─ ")
end
- printstyled(io, k; color=:blue)
+ printstyled(io, k; color=(:blue))
print(io, " = ")
show(io, v)
end
|
|
ffs |
|
!formatbot TuringLang/DynamicPPL.jl style=blue import_to_using=false ignore=["README.md"] |
FormatBot Results
No formatting differences. |
|
!formatbot SciML/Catalyst.jl style=sciml ignore=["test"] |
FormatBot Results
No formatting differences. |
|
!formatbot astroautomata/SymbolicRegression.jl style=blue ignore=["docs"] pipe_to_function_call=false |
FormatBot Results
Diff (1876 bytes)diff --git a/src/MLJInterface.jl b/src/MLJInterface.jl
index f4cdd1b..964f8e9 100644
--- a/src/MLJInterface.jl
+++ b/src/MLJInterface.jl
@@ -321,14 +321,14 @@ function _update(
logger=m.logger,
guesses=m.guesses,
# Help out with inference:
- v_dim_out=isa(m, AbstractSingletargetSRRegressor) ? Val(1) : Val(2),
+ v_dim_out=(isa(m, AbstractSingletargetSRRegressor) ? Val(1) : Val(2)),
)
fitresult = SRFitResult(;
model=m,
state=search_state,
niterations=niterations +
(old_fitresult === nothing ? 0 : old_fitresult.niterations),
- num_targets=isa(m, AbstractSingletargetSRRegressor) ? 1 : size(y_t, 1),
+ num_targets=(isa(m, AbstractSingletargetSRRegressor) ? 1 : size(y_t, 1)),
options=options,
variable_names=variable_names,
y_variable_names=y_variable_names,
diff --git a/src/SearchUtils.jl b/src/SearchUtils.jl
index 05efe4c..7badce0 100644
--- a/src/SearchUtils.jl
+++ b/src/SearchUtils.jl
@@ -724,7 +724,7 @@ function construct_datasets(
y_variable_names
end,
X_units=X_units,
- y_units=isa(y_units, AbstractVector) ? y_units[j] : y_units,
+ y_units=(isa(y_units, AbstractVector) ? y_units[j] : y_units),
extra=extra,
) for j in 1:nout
]
diff --git a/test/integration/ext/loopvectorization/test_turbo_nan.jl b/test/integration/ext/loopvectorization/test_turbo_nan.jl
index 7987d70..b25f1b4 100644
--- a/test/integration/ext/loopvectorization/test_turbo_nan.jl
+++ b/test/integration/ext/loopvectorization/test_turbo_nan.jl
@@ -15,7 +15,7 @@
parsimony=0.01,
)
- tree = Node(3, Node(1, Node(; val=-π / 2)))
+ tree = Node(3, Node(1, Node(; val=(-π / 2))))
# Should still be safe against domain errors:
try
|
is_unary and p_kwis_unary and p_kw, improve consistency of kwarg parenthesisation
|
!formatbot astroautomata/SymbolicRegression.jl style=blue ignore=["docs"] pipe_to_function_call=false |
FormatBot Results
Diff (501 bytes)diff --git a/test/integration/ext/loopvectorization/test_turbo_nan.jl b/test/integration/ext/loopvectorization/test_turbo_nan.jl
index 7987d70..b25f1b4 100644
--- a/test/integration/ext/loopvectorization/test_turbo_nan.jl
+++ b/test/integration/ext/loopvectorization/test_turbo_nan.jl
@@ -15,7 +15,7 @@
parsimony=0.01,
)
- tree = Node(3, Node(1, Node(; val=-π / 2)))
+ tree = Node(3, Node(1, Node(; val=(-π / 2))))
# Should still be safe against domain errors:
try
|
|
Fine, that's intentional. |
|
I should check what caused base to fail on SciMLSensitivity and probably add a unit test for that. |
|
2.5.2: julia> ft("@view (Q_temp' * _vstar_perp)[1:nus]", SciMLStyle())
┌ Warning: Formatted text is not parsable ... no change made.
└ @ JuliaFormatter ~/jl/JuliaFormatter.jl/src/JuliaFormatter.jl:284
ERROR: ParseError:
# Error @ line 1:14
@view (Q_temp ' * _vstar_perp)[1:nus]
# └ ── Expected `)` or `,` |
|
!formatbot SciML/OrdinaryDiffEq.jl style=sciml |
|
I shifted the docs rework to another PR to keep this self-contained. |
I'm very proud to say that none of this was LLM generated, apart from the giant Markdown table of formatting options, whose contents I've manually verified to be accurate. (Oh, the Makie script to make the logo was also Clauded, but that's not actually used anywhere yet.)
This PR refactors a couple of things:
(1) What used to be called
is_unarynow does far more thorough checks. Previously, it wouldn't catch postfix operators likex'.(2)
p_kwwas using some very hacky combinations of predicates to determine whether something on the rhs of akwarg=valueexpression should be parenthesised. (see #360 #361 for context) While this 'worked fine' enough, I think this was not good technical decision. Consequently, I've edited this so that it checks for exactly what it should be checking for. Although the code here is more verbose, it is also more correct and will be easier to edit going forward.Note that this PR will cause JuliaFormatter to add parens around kwargs in more cases, even when this is not totally necessary. This in fact makes its parenthesisation behaviour more consistent. See #1016 for a longer explanation of this.