You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems short function defs that have a docstring are never expanded:
using JuliaFormatter
using JuliaFormatter: options, DefaultStyle
fmt1(s; i =4, m =80, kwargs...) =
JuliaFormatter.format_text(s; kwargs..., indent = i, margin = m)
fmt1(s, i, m; kwargs...) =fmt1(s; kwargs..., i = i, m = m)
# Verifies formatting the formatted text# results in the same outputfunctionfmt(s; i =4, m =80, kwargs...)
kws =merge(options(DefaultStyle()), kwargs)
s1 =fmt1(s; kws..., i = i, m = m)
returnfmt1(s1; kws..., i = i, m = m)
endfmt(s, i, m; kwargs...) =fmt(s; kwargs..., i = i, m = m)
str_ =""" f() = (1,2,3,4,5,6,7,8,9,10)"""print(fmt(str_, 4, 10, short_to_long_function_def =true))
# ok
str_ =""""docstring"f() = (1,2,3,4,5,6,7,8,9,10)"""print(fmt(str_, 4, 10, short_to_long_function_def =true))
# bad
It seems short function defs that have a docstring are never expanded:
The text was updated successfully, but these errors were encountered: