Skip to content

Commit 8905632

Browse files
Merge branch 'main' into fix/nopre-test-group
2 parents 9c8a64e + 72adf82 commit 8905632

4 files changed

Lines changed: 32 additions & 22 deletions

File tree

.JuliaFormatter.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/FormatCheck.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
name: "Format Check"
1+
name: format-check
22

33
on:
44
push:
55
branches:
6+
- 'master'
67
- 'main'
8+
- 'release-'
79
tags: '*'
810
pull_request:
911

1012
jobs:
11-
format-check:
12-
name: "Format Check"
13-
uses: "SciML/.github/.github/workflows/format-suggestions-on-pr.yml@v1"
13+
runic:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: fredrikekre/runic-action@v1
18+
with:
19+
version: '1'

docs/make.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using FunctionWrappersWrappers
22
using Documenter
33

4-
DocMeta.setdocmeta!(FunctionWrappersWrappers, :DocTestSetup,
5-
:(using FunctionWrappersWrappers); recursive = true)
4+
DocMeta.setdocmeta!(
5+
FunctionWrappersWrappers, :DocTestSetup,
6+
:(using FunctionWrappersWrappers); recursive = true
7+
)
68

79
makedocs(;
810
modules = [FunctionWrappersWrappers],

src/FunctionWrappersWrappers.jl

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,45 @@ end
1212
TruncatedStacktraces.@truncate_stacktrace FunctionWrappersWrapper
1313

1414
function (fww::FunctionWrappersWrapper{FW, FB})(args::Vararg{Any, K}) where {FW, K, FB}
15-
_call(fww.fw, args, fww)
15+
return _call(fww.fw, args, fww)
1616
end
1717

18-
function _call(fw::Tuple{FunctionWrappers.FunctionWrapper{R, A}, Vararg},
19-
arg::A, fww::FunctionWrappersWrapper) where {R, A}
20-
first(fw)(arg...)
18+
function _call(
19+
fw::Tuple{FunctionWrappers.FunctionWrapper{R, A}, Vararg},
20+
arg::A, fww::FunctionWrappersWrapper
21+
) where {R, A}
22+
return first(fw)(arg...)
2123
end
22-
function _call(fw::Tuple{FunctionWrappers.FunctionWrapper{R, A1}, Vararg},
23-
arg::A2, fww::FunctionWrappersWrapper) where {R, A1, A2}
24-
_call(Base.tail(fw), arg, fww)
24+
function _call(
25+
fw::Tuple{FunctionWrappers.FunctionWrapper{R, A1}, Vararg},
26+
arg::A2, fww::FunctionWrappersWrapper
27+
) where {R, A1, A2}
28+
return _call(Base.tail(fw), arg, fww)
2529
end
2630

2731
const NO_FUNCTIONWRAPPER_FOUND_MESSAGE = "No matching function wrapper was found!"
2832

2933
struct NoFunctionWrapperFoundError <: Exception end
3034

3135
function Base.showerror(io::IO, e::NoFunctionWrapperFoundError)
32-
print(io, NO_FUNCTIONWRAPPER_FOUND_MESSAGE)
36+
return print(io, NO_FUNCTIONWRAPPER_FOUND_MESSAGE)
3337
end
3438

3539
function _call(::Tuple{}, arg, fww::FunctionWrappersWrapper{<:Any, false})
3640
throw(NoFunctionWrapperFoundError())
3741
end
3842
function _call(::Tuple{}, arg, fww::FunctionWrappersWrapper{<:Any, true})
39-
first(fww.fw).obj[](arg...)
43+
return first(fww.fw).obj[](arg...)
4044
end
4145

4246
function FunctionWrappersWrapper(
4347
f::F, argtypes::Tuple{Vararg{Any, K}}, rettypes::Tuple{Vararg{DataType, K}},
44-
fallback::Val{FB} = Val{false}()) where {F, K, FB}
48+
fallback::Val{FB} = Val{false}()
49+
) where {F, K, FB}
4550
fwt = map(argtypes, rettypes) do A, R
4651
FunctionWrappers.FunctionWrapper{R, A}(f)
4752
end
48-
FunctionWrappersWrapper{typeof(fwt), FB}(fwt)
53+
return FunctionWrappersWrapper{typeof(fwt), FB}(fwt)
4954
end
5055

5156
"""
@@ -95,7 +100,7 @@ wrapped_signatures(fww) # Returns (Tuple{Float64, Float64}, Tuple{Int, Int})
95100
See also: [`unwrap`](@ref), [`wrapped_return_types`](@ref)
96101
"""
97102
function wrapped_signatures(fww::FunctionWrappersWrapper)
98-
map(fw -> typeof(fw).parameters[2], fww.fw)
103+
return map(fw -> typeof(fw).parameters[2], fww.fw)
99104
end
100105

101106
"""
@@ -115,7 +120,7 @@ wrapped_return_types(fww) # Returns (Float64, Int64)
115120
See also: [`unwrap`](@ref), [`wrapped_signatures`](@ref)
116121
"""
117122
function wrapped_return_types(fww::FunctionWrappersWrapper)
118-
map(fw -> typeof(fw).parameters[1], fww.fw)
123+
return map(fw -> typeof(fw).parameters[1], fww.fw)
119124
end
120125

121126
using PrecompileTools

0 commit comments

Comments
 (0)