Skip to content

Commit b6b7e03

Browse files
committed
fix merge
2 parents e8f46bb + 32392ce commit b6b7e03

File tree

7 files changed

+32
-24
lines changed

7 files changed

+32
-24
lines changed

docs/make.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ using DocumenterMermaid
55
repo_url = "github.com/control-toolbox/CTBase.jl"
66

77
makedocs(;
8-
warnonly = [:cross_references, :autodocs_block],
9-
sitename = "CTBase.jl",
10-
format = Documenter.HTML(
11-
repolink = "https://" * repo_url,
12-
prettyurls = false,
13-
size_threshold_ignore = ["api.md", "dev.md"],
14-
assets = [
8+
warnonly=[:cross_references, :autodocs_block],
9+
sitename="CTBase.jl",
10+
format=Documenter.HTML(;
11+
repolink="https://" * repo_url,
12+
prettyurls=false,
13+
size_threshold_ignore=["api.md", "dev.md"],
14+
assets=[
1515
asset("https://control-toolbox.org/assets/css/documentation.css"),
1616
asset("https://control-toolbox.org/assets/js/documentation.js"),
1717
],
1818
),
19-
pages = ["Introduction" => "index.md", "API" => "api.md", "Developers" => "dev.md"],
20-
checkdocs = :none,
19+
pages=["Introduction" => "index.md", "API" => "api.md", "Developers" => "dev.md"],
20+
checkdocs=:none,
2121
)
2222

23-
deploydocs(; repo = repo_url * ".git", devbranch = "main")
23+
deploydocs(; repo=repo_url * ".git", devbranch="main")

src/CTBase.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $(EXPORTS)
1111
"""
1212
module CTBase
1313

14-
import Base
14+
using Base: Base
1515
using DocStringExtensions
1616

1717
# --------------------------------------------------------------------------------------------------

src/description.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ ERROR: IncorrectArgument: the description (:b,) is already in ((:a,), (:b,))
8989
```
9090
"""
9191
function add(x::Tuple{Vararg{Description}}, y::Description)::Tuple{Vararg{Description}}
92-
y x ? throw(IncorrectArgument("the description $y is already in $x")) : return (x..., y)
92+
if y x
93+
throw(IncorrectArgument("the description $y is already in $x"))
94+
else
95+
return (x..., y)
96+
end
9397
end
9498

9599
"""
@@ -110,7 +114,9 @@ julia> getFullDescription((:a,), desc_list)
110114
(:a, :b)
111115
```
112116
"""
113-
function getFullDescription(desc::Description, desc_list::Tuple{Vararg{Description}})::Description
117+
function getFullDescription(
118+
desc::Description, desc_list::Tuple{Vararg{Description}}
119+
)::Description
114120
n = size(desc_list, 1)
115121
table = zeros(Int8, n, 2)
116122
for i in range(1, n)

src/exception.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ struct ExtensionError <: CTException
169169
weakdeps::Tuple{Vararg{Symbol}}
170170
function ExtensionError(weakdeps::Symbol...)
171171
isempty(weakdeps) && throw(
172-
UnauthorizedCall("Please provide at least one weak dependence for the extension."),
172+
UnauthorizedCall(
173+
"Please provide at least one weak dependence for the extension."
174+
),
173175
)
174176
e = new(weakdeps)
175177
return e
@@ -183,12 +185,12 @@ Print the exception.
183185
"""
184186
function Base.showerror(io::IO, e::ExtensionError)
185187
print(io, "ExtensionError. Please make: ")
186-
printstyled(io, "julia>", color = :green, bold = true)
187-
printstyled(io, " using ", color = :magenta)
188+
printstyled(io, "julia>"; color=:green, bold=true)
189+
printstyled(io, " using "; color=:magenta)
188190
N = size(e.weakdeps, 1)
189-
for i range(1, N)
191+
for i in range(1, N)
190192
wd = e.weakdeps[i]
191193
i < N ? print(io, string(wd), ", ") : print(io, string(wd))
192194
end
193-
nothing
195+
return nothing
194196
end

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function ctindices(i::Int)::String
2020
throw(IncorrectArgument("the indice must be positive"))
2121
end
2222
s = ""
23-
for d digits(i)
23+
for d in digits(i)
2424
s = ctindice(d) * s
2525
end
2626
return s
@@ -62,7 +62,7 @@ function ctupperscripts(i::Int)::String
6262
throw(IncorrectArgument("the upperscript must be positive"))
6363
end
6464
s = ""
65-
for d digits(i)
65+
for d in digits(i)
6666
s = ctupperscript(d) * s
6767
end
6868
return s

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using Test
77

88
#
99
@testset verbose = true showtiming = true "Base" begin
10-
for name (
10+
for name in (
1111
:aqua,
1212
:default,
1313
:description,

test/test_aqua.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ function test_aqua()
22
@testset "Aqua.jl" begin
33
Aqua.test_all(
44
CTBase;
5-
ambiguities = false,
5+
ambiguities=false,
66
#stale_deps=(ignore=[:SomePackage],),
7-
deps_compat = (ignore = [:LinearAlgebra, :Unicode],),
8-
piracies = true,
7+
deps_compat=(ignore=[:LinearAlgebra, :Unicode],),
8+
piracies=true,
99
)
1010
# do not warn about ambiguities in dependencies
1111
Aqua.test_ambiguities(CTBase)

0 commit comments

Comments
 (0)