Skip to content

Commit 5a3cadd

Browse files
authored
Use underscore for unnamed arguments (#91)
1 parent 2bbb63b commit 5a3cadd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/utilities.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ simplifications include:
199199
* no `TypeVar`s;
200200
* no types;
201201
* no keyword default values;
202-
* `?` printed where `#unused#` arguments are found.
202+
* `_` printed where `#unused#` arguments are found.
203203
204204
# Examples
205205
@@ -278,7 +278,6 @@ simplifications include:
278278
* no `TypeVar`s;
279279
* no types;
280280
* no keyword default values;
281-
* `?` printed where `#unused#` arguments are found.
282281
283282
# Examples
284283
@@ -369,7 +368,7 @@ function arguments(m::Method)
369368
local template = get_method_source(m)
370369
if isdefined(template, :slotnames)
371370
local args = map(template.slotnames[1:nargs(m)]) do arg
372-
arg === Symbol("#unused#") ? "?" : arg
371+
arg === Symbol("#unused#") ? "_" : arg
373372
end
374373
return filter(arg -> arg !== Symbol("#self#"), args)
375374
end

test/tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ end
174174
DSE.format(SIGNATURES, buf, doc)
175175
str = String(take!(buf))
176176
@test occursin("\n```julia\n", str)
177-
@test occursin("\nh_4(x, ?, z)\n", str)
177+
@test occursin("\nh_4(x, _, z)\n", str)
178178
@test occursin("\n```\n", str)
179179
end
180180

0 commit comments

Comments
 (0)