Skip to content

Commit 8cdab5b

Browse files
authored
fix several minor issues in docstrings and comments (#59531)
mostly NFC grammatical issues except for the ones in `sort.jl` which also make the docstring signatures match the implemented signatures
1 parent 71ab071 commit 8cdab5b

File tree

14 files changed

+20
-20
lines changed

14 files changed

+20
-20
lines changed

base/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ function copyto!(dest::AbstractArray, dstart::Integer, src)
967967
return dest
968968
end
969969

970-
# copy from an some iterable object into an AbstractArray
970+
# copy from an iterable object into an AbstractArray
971971
function copyto!(dest::AbstractArray, dstart::Integer, src, sstart::Integer)
972972
if (sstart < 1)
973973
throw(ArgumentError(LazyString("source start offset (",sstart,") is < 1")))

base/asyncevent.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66
AsyncCondition()
77
8-
Create a async condition that wakes up tasks waiting for it
8+
Create an async condition that wakes up tasks waiting for it
99
(by calling [`wait`](@ref) on the object)
1010
when notified from C by a call to `uv_async_send`.
1111
Waiting tasks are woken with an error when the object is closed (by [`close`](@ref)).
@@ -41,7 +41,7 @@ end
4141
"""
4242
AsyncCondition(callback::Function)
4343
44-
Create a async condition that calls the given `callback` function. The `callback` is passed one argument,
44+
Create an async condition that calls the given `callback` function. The `callback` is passed one argument,
4545
the async condition object itself.
4646
"""
4747
function AsyncCondition(cb::Function)

base/binaryplatforms.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ function parse_dl_name_version(path::AbstractString, os::AbstractString=_this_os
858858
end
859859

860860
function get_csl_member(member::Symbol)
861-
# If CompilerSupportLibraries_jll is an stdlib, we can just grab things from it
861+
# If CompilerSupportLibraries_jll is a stdlib, we can just grab things from it
862862
csl_pkgids = filter(pkgid -> pkgid.name == "CompilerSupportLibraries_jll", keys(Base.loaded_modules))
863863
if !isempty(csl_pkgids)
864864
CSL_mod = Base.loaded_modules[first(csl_pkgids)]
@@ -881,7 +881,7 @@ detected.
881881
"""
882882
function detect_libgfortran_version()
883883
function get_libgfortran_path()
884-
# If CompilerSupportLibraries_jll is an stdlib, we can just directly ask for
884+
# If CompilerSupportLibraries_jll is a stdlib, we can just directly ask for
885885
# the path here, without checking `dllist()`:
886886
libgfortran_path = get_csl_member(:libgfortran_path)
887887
if libgfortran_path !== nothing
@@ -923,7 +923,7 @@ it is linked against (if any). `max_minor_version` is the latest version in the
923923
"""
924924
function detect_libstdcxx_version(max_minor_version::Int=30)
925925
function get_libstdcxx_handle()
926-
# If CompilerSupportLibraries_jll is an stdlib, we can just directly open it
926+
# If CompilerSupportLibraries_jll is a stdlib, we can just directly open it
927927
libstdcxx = get_csl_member(:libstdcxx)
928928
if libstdcxx !== nothing
929929
return nothing

base/dict.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ end
900900
"""
901901
PersistentDict
902902
903-
`PersistentDict` is a dictionary implemented as an hash array mapped trie,
903+
`PersistentDict` is a dictionary implemented as a hash array mapped trie,
904904
which is optimal for situations where you need persistence, each operation
905905
returns a new dictionary separate from the previous one, but the underlying
906906
implementation is space-efficient and may share storage across multiple

base/iobuffer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ function seek(io::GenericIOBuffer, n::Int)
515515
end
516516

517517
# TODO: REPL.jl relies on the fact that this does not throw (by seeking past the beginning or end
518-
# of an GenericIOBuffer), so that would need to be fixed in order to throw an error here
518+
# of a GenericIOBuffer), so that would need to be fixed in order to throw an error here
519519
max_ptr = io.size + 1
520520
min_ptr = get_offset(io) + 1
521521
io.ptr = clamp(translate_seek_position(io, n), min_ptr, max_ptr)

base/multimedia.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ function displayable(m::MIME)
372372
end
373373

374374
###########################################################################
375-
# The redisplay method can be overridden by a AbstractDisplay in order to
375+
# The redisplay method can be overridden by an AbstractDisplay in order to
376376
# update an existing display (instead of, for example, opening a new
377377
# window), and is used by the IJulia interface to defer display
378378
# until the next interactive prompt. This is especially useful

base/regex.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ julia> keys(match(r"(?<hour>\\d+):(?<minute>\\d+)(am|pm)?", "11:30"))
260260
function keys(m::RegexMatch)
261261
idx_to_capture_name = PCRE.capture_names(m.regex.regex)
262262
return map(eachindex(m.captures)) do i
263-
# If the capture group is named, return it's name, else return it's index
263+
# If the capture group is named, return its name, else return its index
264264
get(idx_to_capture_name, i, i)
265265
end
266266
end

base/sort.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function issorted(itr, order::Ordering)
6262
end
6363

6464
"""
65-
issorted(v, lt=isless, by=identity, rev::Bool=false, order::Base.Order.Ordering=Base.Order.Forward)
65+
issorted(itr, lt=isless, by=identity, rev::Bool=false, order::Base.Order.Ordering=Base.Order.Forward)
6666
6767
Test whether a collection is in sorted order. The keywords modify what
6868
order is considered sorted, as described in the [`sort!`](@ref) documentation.
@@ -113,7 +113,7 @@ maybeview(v, k) = view(v, k)
113113
maybeview(v, k::Integer) = v[k]
114114

115115
"""
116-
partialsort!(v, k; by=identity, lt=isless, rev=false)
116+
partialsort!(v, k; by=identity, lt=isless, rev=false, order::Base.Order.Ordering=Base.Order.Forward)
117117
118118
Mutate the vector `v` so that the value at index `k` (or
119119
range of adjacent values if `k` is a range) occurs
@@ -170,7 +170,7 @@ partialsort!(v::AbstractVector, k::Union{Integer,OrdinalRange};
170170
partialsort!(v, k, ord(lt,by,rev,order); kws...)
171171

172172
"""
173-
partialsort(v, k, by=identity, lt=isless, rev=false)
173+
partialsort(v, k, by=identity, lt=isless, rev=false, order::Base.Order.Ordering=Base.Order.Forward)
174174
175175
Variant of [`partialsort!`](@ref) that copies `v` before partially sorting it, thereby returning the
176176
same thing as `partialsort!` but leaving `v` unmodified.

base/special/exp.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ exp10(x)
395395
reinterpret(Float64, 0x0000_0000_0000_0001 << ((x + 1074) % UInt))
396396
else
397397
# We will cast everything to Int64 to avoid errors in case of Int128
398-
# If x is a Int128, and is outside the range of Int64, then it is not -1023<x<=1023
398+
# If x is an Int128, and is outside the range of Int64, then it is not -1023<x<=1023
399399
reinterpret(Float64, (exponent_bias(Float64) + (x % Int64)) << (significand_bits(Float64) % UInt))
400400
end
401401
end

base/strings/annotated.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ See also [`AnnotatedString`](@ref) and [`AnnotatedChar`](@ref).
233233
## Examples
234234
235235
```jldoctest; setup=:(using Base: AnnotatedString, annotatedstring)
236-
julia> annotatedstring("now a AnnotatedString")
237-
"now a AnnotatedString"
236+
julia> annotatedstring("now an AnnotatedString")
237+
"now an AnnotatedString"
238238
239239
julia> annotatedstring(AnnotatedString("annotated", [(1:9, :label, 1)]), ", and unannotated")
240240
"annotated, and unannotated"

0 commit comments

Comments
 (0)