Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show default values and types of keyword arguments? #135

Closed
bowenszhu opened this issue Oct 14, 2022 · 1 comment
Closed

How to show default values and types of keyword arguments? #135

bowenszhu opened this issue Oct 14, 2022 · 1 comment

Comments

@bowenszhu
Copy link

using DocStringExtensions

"""
$(TYPEDSIGNATURES)
"""
function func(a::Integer, b::Integer = a; c::Integer = b)::Integer
    a + b + c
end

@doc func

gives

  func(a::Integer) -> Integer
  func(a::Integer, b::Integer; c) -> Integer

TYPEDSIGNATURES returns a simplified representation of method signatures, which, however, doesn't show the types and default values of keyword arguments. Is there a convenient way to also include them in the docstring?

The expected result is

func(a::Integer, b::Integer = a; c::Integer = b) -> Integer
@bowenszhu
Copy link
Author

Duplicate of #107

@bowenszhu bowenszhu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant