Skip to content

Commit 54a2b01

Browse files
authored
Unify function references in docs (#23535)
* Unify function references by removing misleading () * review fix
1 parent 75ec2b9 commit 54a2b01

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+443
-443
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Library improvements
217217

218218
* The `crc32c` function for CRC-32c checksums is now exported ([#22274]).
219219

220-
* The output of `versioninfo()` is now controlled with keyword arguments ([#21974]).
220+
* The output of `versioninfo` is now controlled with keyword arguments ([#21974]).
221221

222222
* The function `LibGit2.set_remote_url` now always sets both the fetch and push URLs for a
223223
git repo. Additionally, the argument order was changed to be consistent with the git
@@ -889,7 +889,7 @@ Deprecated or removed
889889
`pop!(ENV, k, def)`. Be aware that `pop!` returns `k` or `def`, whereas `delete!`
890890
returns `ENV` or `def` ([#18012]).
891891
892-
* infix operator `$` has been deprecated in favor of infix `⊻` or function `xor()` ([#18977]).
892+
* infix operator `$` has been deprecated in favor of infix `⊻` or function `xor` ([#18977]).
893893
894894
* The single-argument form of `write` (`write(x)`, with implicit `STDOUT` output stream),
895895
has been deprecated in favor of the explicit equivalent `write(STDOUT, x)` ([#17654]).

base/asyncmap.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ up to 100 tasks will be used for concurrent mapping.
1515
1616
`ntasks` can also be specified as a zero-arg function. In this case, the
1717
number of tasks to run in parallel is checked before processing every element and a new
18-
task started if the value of `ntasks_func()` is less than the current number
18+
task started if the value of `ntasks_func` is less than the current number
1919
of tasks.
2020
2121
If `batch_size` is specified, the collection is processed in batch mode. `f` must
@@ -285,7 +285,7 @@ Returns an iterator which applies `f` to each element of `c` asynchronously
285285
and collects output into `results`.
286286
287287
Keyword args `ntasks` and `batch_size` have the same behavior as in
288-
[`asyncmap()`](@ref). If `batch_size` is specified, `f` must
288+
[`asyncmap`](@ref). If `batch_size` is specified, `f` must
289289
be a function which operates on an array of argument tuples.
290290
291291
!!! note
@@ -360,7 +360,7 @@ end
360360
Apply `f` to each element of `c` using at most `ntasks` asynchronous tasks.
361361
362362
Keyword args `ntasks` and `batch_size` have the same behavior as in
363-
[`asyncmap()`](@ref). If `batch_size` is specified, `f` must
363+
[`asyncmap`](@ref). If `batch_size` is specified, `f` must
364364
be a function which operates on an array of argument tuples.
365365
366366
!!! note
@@ -415,7 +415,7 @@ length(itr::AsyncGenerator) = length(itr.collector.enumerator)
415415
"""
416416
asyncmap!(f, results, c...; ntasks=0, batch_size=nothing)
417417
418-
Like [`asyncmap()`](@ref), but stores output in `results` rather than
418+
Like [`asyncmap`](@ref), but stores output in `results` rather than
419419
returning a collection.
420420
"""
421421
function asyncmap!(f, r, c1, c...; ntasks=0, batch_size=nothing)

base/distributed/remotecall.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ RemoteChannel(pid::Integer=myid()) = RemoteChannel{Channel{Any}}(pid, RRID())
9494
"""
9595
RemoteChannel(f::Function, pid::Integer=myid())
9696
97-
Create references to remote channels of a specific size and type. `f()` is a function that
97+
Create references to remote channels of a specific size and type. `f` is a function that
9898
when executed on `pid` must return an implementation of an `AbstractChannel`.
9999
100100
For example, `RemoteChannel(()->Channel{Int}(10), pid)`, will return a reference to a

base/distributed/workerpool.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ const _default_worker_pool = Ref{Nullable}(Nullable{WorkerPool}())
190190
"""
191191
default_worker_pool()
192192
193-
`WorkerPool` containing idle `workers()` - used by `remote(f)` and [`pmap`](@ref) (by default).
193+
`WorkerPool` containing idle `workers` - used by `remote(f)` and [`pmap`](@ref) (by default).
194194
"""
195195
function default_worker_pool()
196196
# On workers retrieve the default worker pool from the master when accessed

base/docs/basedocs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ kw"primitive type"
132132
"""
133133
`macro` defines a method to include generated code in the final body of a program. A
134134
macro maps a tuple of arguments to a returned expression, and the resulting expression
135-
is compiled directly rather than requiring a runtime `eval()` call. Macro arguments may
135+
is compiled directly rather than requiring a runtime `eval` call. Macro arguments may
136136
include expressions, literal values, and symbols. For example:
137137
138138
macro sayhello(name)
@@ -189,7 +189,7 @@ modify the global variable `z`:
189189
julia> z
190190
6
191191
192-
Without the `global` declaration in `foo()`, a new local variable would have been
192+
Without the `global` declaration in `foo`, a new local variable would have been
193193
created inside foo(), and the `z` in the global scope would have remained equal to `3`.
194194
"""
195195
kw"global"

base/env.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ end
143143
"""
144144
withenv(f::Function, kv::Pair...)
145145
146-
Execute `f()` in an environment that is temporarily modified (not replaced as in `setenv`)
146+
Execute `f` in an environment that is temporarily modified (not replaced as in `setenv`)
147147
by zero or more `"var"=>val` arguments `kv`. `withenv` is generally used via the
148148
`withenv(kv...) do ... end` syntax. A value of `nothing` can be used to temporarily unset an
149149
environment variable (if it is set). When `withenv` returns, the original environment has

base/indices.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ _maybetail(t::Tuple) = tail(t)
224224
225225
Represent an AbstractUnitRange of indices as a vector of the indices themselves.
226226
227-
Upon calling `to_indices()`, Colons are converted to Slice objects to represent
227+
Upon calling `to_indices`, Colons are converted to Slice objects to represent
228228
the indices over which the Colon spans. Slice objects are themselves unit
229229
ranges with the same indices as those they wrap. This means that indexing into
230230
Slice objects with an integer always returns that exact integer, and they

base/printf.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ end
11941194
"""
11951195
@printf([io::IOStream], "%Fmt", args...)
11961196
1197-
Print `args` using C `printf()` style format specification string, with some caveats:
1197+
Print `args` using C `printf` style format specification string, with some caveats:
11981198
`Inf` and `NaN` are printed consistently as `Inf` and `NaN` for flags `%a`, `%A`,
11991199
`%e`, `%E`, `%f`, `%F`, `%g`, and `%G`. Furthermore, if a floating point number is
12001200
equally close to the numeric values of two possible output strings, the output

doc/src/devdocs/ast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Julia ASTs
22

33
Julia has two representations of code. First there is a surface syntax AST returned by the parser
4-
(e.g. the [`parse()`](@ref) function), and manipulated by macros. It is a structured representation
4+
(e.g. the [`parse`](@ref) function), and manipulated by macros. It is a structured representation
55
of code as it is written, constructed by `julia-parser.scm` from a character stream. Next there
66
is a lowered form, or IR (intermediate representation), which is used by type inference and code
77
generation. In the lowered form there are fewer types of nodes, all macros are expanded, and all

doc/src/devdocs/reflection.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ returns symbols for all bindings in `m`, regardless of export status.
1010

1111
## DataType fields
1212

13-
The names of `DataType` fields may be interrogated using [`fieldnames()`](@ref). For example,
13+
The names of `DataType` fields may be interrogated using [`fieldnames`](@ref). For example,
1414
given the following type, `fieldnames(Point)` returns an arrays of [`Symbol`](@ref) elements representing
1515
the field names:
1616

@@ -49,7 +49,7 @@ of these fields is the `types` field observed in the example above.
4949

5050
## Subtypes
5151

52-
The *direct* subtypes of any `DataType` may be listed using [`subtypes()`](@ref). For example,
52+
The *direct* subtypes of any `DataType` may be listed using [`subtypes`](@ref). For example,
5353
the abstract `DataType` [`AbstractFloat`](@ref) has four (concrete) subtypes:
5454

5555
```jldoctest
@@ -62,7 +62,7 @@ julia> subtypes(AbstractFloat)
6262
```
6363

6464
Any abstract subtype will also be included in this list, but further subtypes thereof will not;
65-
recursive application of [`subtypes()`](@ref) may be used to inspect the full type tree.
65+
recursive application of [`subtypes`](@ref) may be used to inspect the full type tree.
6666

6767
## DataType layout
6868

@@ -73,12 +73,12 @@ returns the (byte) offset for field *i* relative to the start of the type.
7373

7474
## Function methods
7575

76-
The methods of any generic function may be listed using [`methods()`](@ref). The method dispatch
77-
table may be searched for methods accepting a given type using [`methodswith()`](@ref).
76+
The methods of any generic function may be listed using [`methods`](@ref). The method dispatch
77+
table may be searched for methods accepting a given type using [`methodswith`](@ref).
7878

7979
## Expansion and lowering
8080

81-
As discussed in the [Metaprogramming](@ref) section, the [`macroexpand()`](@ref) function gives
81+
As discussed in the [Metaprogramming](@ref) section, the [`macroexpand`](@ref) function gives
8282
the unquoted and interpolated expression (`Expr`) form for a given macro. To use `macroexpand`,
8383
`quote` the expression block itself (otherwise, the macro will be evaluated and the result will
8484
be passed instead!). For example:
@@ -88,10 +88,10 @@ julia> macroexpand(@__MODULE__, :(@edit println("")) )
8888
:((Base.edit)(println, (Base.typesof)("")))
8989
```
9090

91-
The functions `Base.Meta.show_sexpr()` and [`dump()`](@ref) are used to display S-expr style views
91+
The functions `Base.Meta.show_sexpr` and [`dump`](@ref) are used to display S-expr style views
9292
and depth-nested detail views for any expression.
9393

94-
Finally, the [`expand()`](@ref) function gives the `lowered` form of any expression and is of
94+
Finally, the [`expand`](@ref) function gives the `lowered` form of any expression and is of
9595
particular interest for understanding both macros and top-level statements such as function declarations
9696
and variable assignments:
9797

@@ -113,7 +113,7 @@ Inspecting the lowered form for functions requires selection of the specific met
113113
because generic functions may have many methods with different type signatures. For this purpose,
114114
method-specific code-lowering is available using [`code_lowered(f::Function, (Argtypes...))`](@ref),
115115
and the type-inferred form is available using [`code_typed(f::Function, (Argtypes...))`](@ref).
116-
[`code_warntype(f::Function, (Argtypes...))`](@ref) adds highlighting to the output of [`code_typed()`](@ref)
116+
[`code_warntype(f::Function, (Argtypes...))`](@ref) adds highlighting to the output of [`code_typed`](@ref)
117117
(see [`@code_warntype`](@ref)).
118118

119119
Closer to the machine, the LLVM intermediate representation of a function may be printed using

0 commit comments

Comments
 (0)