Skip to content

Commit

Permalink
don't print parentheses for empty args
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Jun 2, 2020
1 parent 5a2cdb0 commit d1549b9
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/ClearStacktrace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,23 @@ function print_frame(io, i, func, inlined, modul, file, line, stypes,
# function name
printstyled(io, func, bold = true)

# type signature
printstyled(io, "(", color = :light_black)

i = 1
for (stype, (varname, vartype)) in zip(stypes, args)
if i > 1
printstyled(io, ", ", color = :light_black)
if !isempty(args)
# type signature
printstyled(io, "(", color = :light_black)

i = 1
for (stype, (varname, vartype)) in zip(stypes, args)
if i > 1
printstyled(io, ", ", color = :light_black)
end
printstyled(io, string(varname), color = :light_black, bold = true)
printstyled(io, "::")
printstyled(io, string(stype), color = :light_black)
i += 1
end
printstyled(io, string(varname), color = :light_black, bold = true)
printstyled(io, "::")
printstyled(io, string(stype), color = :light_black)
i += 1
end

printstyled(io, ")", color = :light_black)
printstyled(io, ")", color = :light_black)
end

println(io)

Expand Down

2 comments on commit d1549b9

@jkrumbiegel
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/15733

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" d1549b9fb2b5703ea1162a1802df664ab5ba7b43
git push origin v0.2.1

Please sign in to comment.