From 3a8bfe07ebe510916ec18b87bcca6f0c4d1668c0 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Sat, 17 Feb 2024 17:10:59 +0100 Subject: [PATCH] Fix some typos in docstrings and comments (#53368) --- base/binaryplatforms.jl | 2 +- base/docs/Docs.jl | 4 ++-- base/env.jl | 2 +- base/regex.jl | 2 +- base/toml_parser.jl | 2 +- base/version.jl | 2 +- src/task.c | 4 ++-- test/compiler/inline.jl | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/base/binaryplatforms.jl b/base/binaryplatforms.jl index e0ee107c4ec73c..9e45275f026366 100644 --- a/base/binaryplatforms.jl +++ b/base/binaryplatforms.jl @@ -306,7 +306,7 @@ function compare_version_cap(a::String, b::String, a_requested::Bool, b_requeste return a == b end - # Otherwise, do the comparison between the the single version cap and the single version: + # Otherwise, do the comparison between the single version cap and the single version: if a_requested return b <= a else diff --git a/base/docs/Docs.jl b/base/docs/Docs.jl index 637a8e1a50bd93..0c83376ecfc766 100644 --- a/base/docs/Docs.jl +++ b/base/docs/Docs.jl @@ -194,7 +194,7 @@ docexpr(__source__, __module__, args...) = Expr(:call, docstr, args...) Stores a collection of docstrings for related objects, ie. a `Function`/`DataType` and associated `Method` objects. -Each documented object in a `MultiDoc` is referred to by it's signature which is represented +Each documented object in a `MultiDoc` is referred to by its signature which is represented by a `Union` of `Tuple` types. For example, the following `Method` definition f(x, y) = ... @@ -243,7 +243,7 @@ function doc!(__module__::Module, b::Binding, str::DocStr, @nospecialize sig = U @warn "Replacing docs for `$b :: $sig` in module `$(__module__)`" else # The ordering of docstrings for each Binding is defined by the order in which they - # are initially added. Replacing a specific docstring does not change it's ordering. + # are initially added. Replacing a specific docstring does not change its ordering. push!(m.order, sig) end m.docs[sig] = str diff --git a/base/env.jl b/base/env.jl index 2928a8bdfede29..6248f1933d1ecb 100644 --- a/base/env.jl +++ b/base/env.jl @@ -131,7 +131,7 @@ const get_bool_env_falsy = ( Base.get_bool_env(name::String, default::Bool; throw=false)::Union{Bool,Nothing} Base.get_bool_env(f_default::Callable, name::String; throw=false)::Union{Bool,Nothing} -Evaluate whether the value of environnment variable `name` is a truthy or falsy string, +Evaluate whether the value of environment variable `name` is a truthy or falsy string, and return `nothing` (or throw if `throw=true`) if it is not recognized as either. If the variable is not set, or is set to "", return `default` or the result of executing `f_default()`. diff --git a/base/regex.jl b/base/regex.jl index 78eefa1741b0c9..5018c9623f7e34 100644 --- a/base/regex.jl +++ b/base/regex.jl @@ -185,7 +185,7 @@ If a group was not captured, `nothing` will be yielded instead of a substring. Methods that accept a `RegexMatch` object are defined for [`iterate`](@ref), [`length`](@ref), [`eltype`](@ref), [`keys`](@ref keys(::RegexMatch)), [`haskey`](@ref), and -[`getindex`](@ref), where keys are the the names or numbers of a capture group. +[`getindex`](@ref), where keys are the names or numbers of a capture group. See [`keys`](@ref keys(::RegexMatch)) for more information. # Examples diff --git a/base/toml_parser.jl b/base/toml_parser.jl index eb7ffda2f5940d..23fc14a894c069 100644 --- a/base/toml_parser.jl +++ b/base/toml_parser.jl @@ -2,7 +2,7 @@ """ `Base.TOML` is an undocumented internal part of Julia's TOML parser -implementation. Users should call the the documented interface in the +implementation. Users should call the documented interface in the TOML.jl standard library instead (by `import TOML` or `using TOML`). """ module TOML diff --git a/base/version.jl b/base/version.jl index e078b5f9d4ac9c..90c34b78c868ff 100644 --- a/base/version.jl +++ b/base/version.jl @@ -16,7 +16,7 @@ alphanumeric annotations. `VersionNumber` objects can be compared with all of the standard comparison operators (`==`, `<`, `<=`, etc.), with the result following semver rules. -`VersionNumber` has the the following public fields: +`VersionNumber` has the following public fields: - `v.major::Integer` - `v.minor::Integer` - `v.patch::Integer` diff --git a/src/task.c b/src/task.c index 4bf12250b7d2cc..a1e8dabb89f9dc 100644 --- a/src/task.c +++ b/src/task.c @@ -197,7 +197,7 @@ static void JL_NO_ASAN JL_NO_MSAN memcpy_stack_a16(uint64_t *to, uint64_t *from, memcpy_noasan((char*)to_addr, (char*)from_addr, shadow_nb); memcpy_a16_noasan(jl_assume_aligned(to, 16), jl_assume_aligned(from, 16), nb); #elif defined(_COMPILER_MSAN_ENABLED_) -# warning This function is imcompletely implemented for MSAN (TODO). +# warning This function is incompletely implemented for MSAN (TODO). memcpy((char*)jl_assume_aligned(to, 16), (char*)jl_assume_aligned(from, 16), nb); #else memcpy((char*)jl_assume_aligned(to, 16), (char*)jl_assume_aligned(from, 16), nb); @@ -884,7 +884,7 @@ then reduced to a single value by computing a dot product with a shared vector of random weights. The weights are common but each pedigree of each task is distinct, so the dot product of each task is unlikely to be the same. The DotMix paper provides a proof that this dot product hash value (referred to as a -"compression function") is collision resistant in the sense the the pairwise +"compression function") is collision resistant in the sense that the pairwise collision probability of two distinct tasks is 1/N where N is the number of possible weight values. Both DotMix and SplitMix use a prime value of N because the proof requires that the difference between two distinct pedigree coordinates diff --git a/test/compiler/inline.jl b/test/compiler/inline.jl index d4c6659593fe63..99918a1c91c64b 100644 --- a/test/compiler/inline.jl +++ b/test/compiler/inline.jl @@ -761,7 +761,7 @@ end let f(x) = (x...,) # Test splatting with a Union of non-{Tuple, SimpleVector} types that require creating new `iterate` calls # in inlining. For this particular case, we're relying on `iterate(::CaretesianIndex)` throwing an error, such - # the the original apply call is not union-split, but the inserted `iterate` call is. + # that the original apply call is not union-split, but the inserted `iterate` call is. @test code_typed(f, Tuple{Union{Int64, CartesianIndex{1}, CartesianIndex{3}}})[1][2] == Tuple{Int64} end