From 100a741e7ab38c91d48cc929bb001afc8e09261f Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Thu, 17 Feb 2022 15:24:28 -0500 Subject: [PATCH] whitespace: replace non-breaking space => space --- HISTORY.md | 2 +- Makefile | 2 +- base/abstractset.jl | 2 +- base/array.jl | 2 +- base/gmp.jl | 2 +- base/indices.jl | 8 ++-- base/reflection.jl | 2 +- base/strings/basic.jl | 16 +++---- base/strings/io.jl | 2 +- base/strings/string.jl | 12 ++--- base/strings/substring.jl | 2 +- doc/src/base/punctuation.md | 2 +- doc/src/devdocs/init.md | 44 +++++++++---------- doc/src/manual/faq.md | 2 +- .../integers-and-floating-point-numbers.md | 10 ++--- doc/src/manual/interfaces.md | 18 ++++---- doc/src/manual/variables-and-scoping.md | 4 +- src/dlload.c | 2 +- stdlib/DelimitedFiles/test/runtests.jl | 2 +- stdlib/LinearAlgebra/test/blas.jl | 4 +- stdlib/REPL/docs/src/index.md | 6 +-- test/file.jl | 2 +- test/misc.jl | 8 ++-- test/show.jl | 4 +- test/strings/basic.jl | 2 +- 25 files changed, 81 insertions(+), 81 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index f14f91eef3507..1fcb416d4d47f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4102,7 +4102,7 @@ Library improvements + Using colons (`:`) to represent a collection of indices is deprecated. They now must be explicitly converted to a specialized array of integers with the `to_indices` function. -    As a result, the type of `SubArray`s that represent views over colon indices has changed. + As a result, the type of `SubArray`s that represent views over colon indices has changed. + Logical indexing is now more efficient. Logical arrays are converted by `to_indices` to a lazy, iterable collection of indices that doesn't support indexing. A deprecation diff --git a/Makefile b/Makefile index df6e998d47c35..8536d9e0fe594 100644 --- a/Makefile +++ b/Makefile @@ -472,7 +472,7 @@ endif # Include all git-tracked filenames git ls-files >> light-source-dist.tmp - + # Include documentation filenames find doc/_build/html >> light-source-dist.tmp diff --git a/base/abstractset.jl b/base/abstractset.jl index 561e18c15697c..960c414484668 100644 --- a/base/abstractset.jl +++ b/base/abstractset.jl @@ -434,7 +434,7 @@ issetequal(a::AbstractSet, b) = issetequal(a, Set(b)) function issetequal(a, b::AbstractSet) if haslength(a) # check b for too many unique elements - length(a) < length(b) && return false + length(a) < length(b) && return false end return issetequal(Set(a), b) end diff --git a/base/array.jl b/base/array.jl index b8ad7e137f25e..b211d507a07ff 100644 --- a/base/array.jl +++ b/base/array.jl @@ -452,7 +452,7 @@ the `value` that was passed; this means that if the `value` is itself modified, all elements of the `fill`ed array will reflect that modification because they're _still_ that very `value`. This is of no concern with `fill(1.0, (5,5))` as the `value` `1.0` is immutable and cannot itself be modified, but can be unexpected -with mutable values like — most commonly — arrays. For example, `fill([], 3)` +with mutable values like — most commonly — arrays. For example, `fill([], 3)` places _the very same_ empty array in all three locations of the returned vector: ```jldoctest diff --git a/base/gmp.jl b/base/gmp.jl index 435a0a0954ce9..3122fdbe11ef7 100644 --- a/base/gmp.jl +++ b/base/gmp.jl @@ -736,7 +736,7 @@ function digits!(a::AbstractVector{T}, n::BigInt; base::Integer = 10) where {T<: i, j = firstindex(a)-1, length(s)+1 lasti = min(lastindex(a), firstindex(a) + length(s)-1 - isneg(n)) while i < lasti - # base ≤ 36: 0-9, plus a-z for 10-35 + # base ≤ 36: 0-9, plus a-z for 10-35 # base > 36: 0-9, plus A-Z for 10-35 and a-z for 36..61 x = s[j -= 1] a[i += 1] = base ≤ 36 ? (x>0x39 ? x-0x57 : x-0x30) : (x>0x39 ? (x>0x60 ? x-0x3d : x-0x37) : x-0x30) diff --git a/base/indices.jl b/base/indices.jl index 6f3be4f8b0eed..8cea043569ae6 100644 --- a/base/indices.jl +++ b/base/indices.jl @@ -23,11 +23,11 @@ A linear indexing style uses one integer index to describe the position in the a (even if it's a multidimensional array) and column-major ordering is used to efficiently access the elements. This means that requesting [`eachindex`](@ref) from an array that is `IndexLinear` will return -a simple one-dimensional range, even if it is multidimensional. +a simple one-dimensional range, even if it is multidimensional. A custom array that reports its `IndexStyle` as `IndexLinear` only needs to implement indexing (and indexed assignment) with a single `Int` index; -all other indexing expressions — including multidimensional accesses — will +all other indexing expressions — including multidimensional accesses — will be recomputed to the linear index. For example, if `A` were a `2×3` custom matrix with linear indexing, and we referenced `A[1, 3]`, this would be recomputed to the equivalent linear index and call `A[5]` since `2*1 + 3 = 5`. @@ -50,13 +50,13 @@ a range of [`CartesianIndices`](@ref). A `N`-dimensional custom array that reports its `IndexStyle` as `IndexCartesian` needs to implement indexing (and indexed assignment) with exactly `N` `Int` indices; -all other indexing expressions — including linear indexing — will +all other indexing expressions — including linear indexing — will be recomputed to the equivalent Cartesian location. For example, if `A` were a `2×3` custom matrix with cartesian indexing, and we referenced `A[5]`, this would be recomputed to the equivalent Cartesian index and call `A[1, 3]` since `5 = 2*1 + 3`. It is significantly more expensive to compute Cartesian indices from a linear index than it is -to go the other way. The former operation requires division — a very costly operation — whereas +to go the other way. The former operation requires division — a very costly operation — whereas the latter only uses multiplication and addition and is essentially free. This asymmetry means it is far more costly to use linear indexing with an `IndexCartesian` array than it is to use Cartesian indexing with an `IndexLinear` array. diff --git a/base/reflection.jl b/base/reflection.jl index 95fb81c8859d6..3ad950e963a64 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -1545,7 +1545,7 @@ Alternatively, in isolation `m1` and `m2` might be ordered, but if a third method cannot be sorted with them, they may cause an ambiguity together. For parametric types, the `ambiguous_bottom` keyword argument controls whether -`Union{}` counts as an ambiguous intersection of type parameters – when `true`, +`Union{}` counts as an ambiguous intersection of type parameters – when `true`, it is considered ambiguous, when `false` it is not. # Examples diff --git a/base/strings/basic.jl b/base/strings/basic.jl index 515b836311698..45e5901d1ccec 100644 --- a/base/strings/basic.jl +++ b/base/strings/basic.jl @@ -16,7 +16,7 @@ about strings: * Each `AbstractChar` in a string is encoded by one or more code units * Only the index of the first code unit of an `AbstractChar` is a valid index * The encoding of an `AbstractChar` is independent of what precedes or follows it - * String encodings are [self-synchronizing] – i.e. `isvalid(s, i)` is O(1) + * String encodings are [self-synchronizing] – i.e. `isvalid(s, i)` is O(1) [self-synchronizing]: https://en.wikipedia.org/wiki/Self-synchronizing_code @@ -46,8 +46,8 @@ AbstractString ncodeunits(s::AbstractString) -> Int Return the number of code units in a string. Indices that are in bounds to -access this string must satisfy `1 ≤ i ≤ ncodeunits(s)`. Not all such indices -are valid – they may not be the start of a character, but they will return a +access this string must satisfy `1 ≤ i ≤ ncodeunits(s)`. Not all such indices +are valid – they may not be the start of a character, but they will return a code unit value when calling `codeunit(s,i)`. # Examples @@ -389,7 +389,7 @@ length(s::AbstractString) = @inbounds return length(s, 1, ncodeunits(s)::Int) function length(s::AbstractString, i::Int, j::Int) @boundscheck begin 0 < i ≤ ncodeunits(s)::Int+1 || throw(BoundsError(s, i)) - 0 ≤ j < ncodeunits(s)::Int+1 || throw(BoundsError(s, j)) + 0 ≤ j < ncodeunits(s)::Int+1 || throw(BoundsError(s, j)) end n = 0 for k = i:j @@ -438,8 +438,8 @@ thisind(s::AbstractString, i::Integer) = thisind(s, Int(i)) function thisind(s::AbstractString, i::Int) z = ncodeunits(s)::Int + 1 i == z && return i - @boundscheck 0 ≤ i ≤ z || throw(BoundsError(s, i)) - @inbounds while 1 < i && !(isvalid(s, i)::Bool) + @boundscheck 0 ≤ i ≤ z || throw(BoundsError(s, i)) + @inbounds while 1 < i && !(isvalid(s, i)::Bool) i -= 1 end return i @@ -498,7 +498,7 @@ function prevind(s::AbstractString, i::Int, n::Int) z = ncodeunits(s) + 1 @boundscheck 0 < i ≤ z || throw(BoundsError(s, i)) n == 0 && return thisind(s, i) == i ? i : string_index_err(s, i) - while n > 0 && 1 < i + while n > 0 && 1 < i @inbounds n -= isvalid(s, i -= 1) end return i - n @@ -557,7 +557,7 @@ function nextind(s::AbstractString, i::Int, n::Int) z = ncodeunits(s) @boundscheck 0 ≤ i ≤ z || throw(BoundsError(s, i)) n == 0 && return thisind(s, i) == i ? i : string_index_err(s, i) - while n > 0 && i < z + while n > 0 && i < z @inbounds n -= isvalid(s, i += 1) end return i + n diff --git a/base/strings/io.jl b/base/strings/io.jl index fffe7904ebf92..d1bf7a763e93c 100644 --- a/base/strings/io.jl +++ b/base/strings/io.jl @@ -209,7 +209,7 @@ function show( # early out for short strings len = ncodeunits(str) - len ≤ limit - 2 && # quote chars + len ≤ limit - 2 && # quote chars return show(io, str) # these don't depend on string data diff --git a/base/strings/string.jl b/base/strings/string.jl index 70e46b29b546e..3053c82ad2da1 100644 --- a/base/strings/string.jl +++ b/base/strings/string.jl @@ -247,7 +247,7 @@ function getindex_continued(s::String, i::Int, u::UInt32) end n = ncodeunits(s) - (i += 1) > n && @goto ret + (i += 1) > n && @goto ret @inbounds b = codeunit(s, i) # cont byte 1 b & 0xc0 == 0x80 || @goto ret u |= UInt32(b) << 16 @@ -287,7 +287,7 @@ length(s::String) = length_continued(s, 1, ncodeunits(s), ncodeunits(s)) @inline function length(s::String, i::Int, j::Int) @boundscheck begin 0 < i ≤ ncodeunits(s)+1 || throw(BoundsError(s, i)) - 0 ≤ j < ncodeunits(s)+1 || throw(BoundsError(s, j)) + 0 ≤ j < ncodeunits(s)+1 || throw(BoundsError(s, j)) end j < i && return 0 @inbounds i, k = thisind(s, i), i @@ -300,8 +300,8 @@ end @inbounds b = codeunit(s, i) @inbounds while true while true - (i += 1) ≤ n || return c - 0xc0 ≤ b ≤ 0xf7 && break + (i += 1) ≤ n || return c + 0xc0 ≤ b ≤ 0xf7 && break b = codeunit(s, i) end l = b @@ -309,12 +309,12 @@ end c -= (x = b & 0xc0 == 0x80) x & (l ≥ 0xe0) || continue - (i += 1) ≤ n || return c + (i += 1) ≤ n || return c b = codeunit(s, i) # cont byte 2 c -= (x = b & 0xc0 == 0x80) x & (l ≥ 0xf0) || continue - (i += 1) ≤ n || return c + (i += 1) ≤ n || return c b = codeunit(s, i) # cont byte 3 c -= (b & 0xc0 == 0x80) end diff --git a/base/strings/substring.jl b/base/strings/substring.jl index 5142cf65fe9c5..8e36f7e1b051f 100644 --- a/base/strings/substring.jl +++ b/base/strings/substring.jl @@ -25,7 +25,7 @@ struct SubString{T<:AbstractString} <: AbstractString ncodeunits::Int function SubString{T}(s::T, i::Int, j::Int) where T<:AbstractString - i ≤ j || return new(s, 0, 0) + i ≤ j || return new(s, 0, 0) @boundscheck begin checkbounds(s, i:j) @inbounds isvalid(s, i) || string_index_err(s, i) diff --git a/doc/src/base/punctuation.md b/doc/src/base/punctuation.md index 526f11d831127..5e0c758fa3171 100644 --- a/doc/src/base/punctuation.md +++ b/doc/src/base/punctuation.md @@ -30,7 +30,7 @@ Extended documentation for mathematical symbols & functions is [here](@ref math- | `a[]` | [array indexing](@ref man-array-indexing) (calling [`getindex`](@ref) or [`setindex!`](@ref)) | | `[,]` | [vector literal constructor](@ref man-array-literals) (calling [`vect`](@ref Base.vect)) | | `[;]` | [vertical concatenation](@ref man-array-concatenation) (calling [`vcat`](@ref) or [`hvcat`](@ref)) | -| `[   ]` | with space-separated expressions, [horizontal concatenation](@ref man-concatenation) (calling [`hcat`](@ref) or [`hvcat`](@ref)) | +| `[ ]` | with space-separated expressions, [horizontal concatenation](@ref man-concatenation) (calling [`hcat`](@ref) or [`hvcat`](@ref)) | | `T{ }` | curly braces following a type list that type's [parameters](@ref Parametric-Types) | | `{}` | curly braces can also be used to group multiple [`where`](@ref) expressions in function declarations | | `;` | semicolons separate statements, begin a list of keyword arguments in function declarations or calls, or are used to separate array literals for vertical concatenation | diff --git a/doc/src/devdocs/init.md b/doc/src/devdocs/init.md index cf954884c57b6..348e69f673f80 100644 --- a/doc/src/devdocs/init.md +++ b/doc/src/devdocs/init.md @@ -185,32 +185,32 @@ Hello World! | `jl_uv_write()` | `jl_uv.c` | called though [`ccall`](@ref) | | `julia_write_282942` | `stream.jl` | function `write!(s::IO, a::Array{T}) where T` | | `julia_print_284639` | `ascii.jl` | `print(io::IO, s::String) = (write(io, s); nothing)` | -| `jlcall_print_284639` |   |   | -| `jl_apply()` | `julia.h` |   | -| `jl_trampoline()` | `builtins.c` |   | -| `jl_apply()` | `julia.h` |   | +| `jlcall_print_284639` | | | +| `jl_apply()` | `julia.h` | | +| `jl_trampoline()` | `builtins.c` | | +| `jl_apply()` | `julia.h` | | | `jl_apply_generic()` | `gf.c` | `Base.print(Base.TTY, String)` | -| `jl_apply()` | `julia.h` |   | -| `jl_trampoline()` | `builtins.c` |   | -| `jl_apply()` | `julia.h` |   | +| `jl_apply()` | `julia.h` | | +| `jl_trampoline()` | `builtins.c` | | +| `jl_apply()` | `julia.h` | | | `jl_apply_generic()` | `gf.c` | `Base.print(Base.TTY, String, Char, Char...)` | -| `jl_apply()` | `julia.h` |   | -| `jl_f_apply()` | `builtins.c` |   | -| `jl_apply()` | `julia.h` |   | -| `jl_trampoline()` | `builtins.c` |   | -| `jl_apply()` | `julia.h` |   | +| `jl_apply()` | `julia.h` | | +| `jl_f_apply()` | `builtins.c` | | +| `jl_apply()` | `julia.h` | | +| `jl_trampoline()` | `builtins.c` | | +| `jl_apply()` | `julia.h` | | | `jl_apply_generic()` | `gf.c` | `Base.println(Base.TTY, String, String...)` | -| `jl_apply()` | `julia.h` |   | -| `jl_trampoline()` | `builtins.c` |   | -| `jl_apply()` | `julia.h` |   | +| `jl_apply()` | `julia.h` | | +| `jl_trampoline()` | `builtins.c` | | +| `jl_apply()` | `julia.h` | | | `jl_apply_generic()` | `gf.c` | `Base.println(String,)` | -| `jl_apply()` | `julia.h` |   | -| `do_call()` | `interpreter.c` |   | -| `eval_body()` | `interpreter.c` |   | -| `jl_interpret_toplevel_thunk` | `interpreter.c` |   | -| `jl_toplevel_eval_flex` | `toplevel.c` |   | -| `jl_toplevel_eval_in` | `toplevel.c` |   | -| `Core.eval` | `boot.jl` |   | +| `jl_apply()` | `julia.h` | | +| `do_call()` | `interpreter.c` | | +| `eval_body()` | `interpreter.c` | | +| `jl_interpret_toplevel_thunk` | `interpreter.c` | | +| `jl_toplevel_eval_flex` | `toplevel.c` | | +| `jl_toplevel_eval_in` | `toplevel.c` | | +| `Core.eval` | `boot.jl` | | Since our example has just one function call, which has done its job of printing "Hello World!", the stack now rapidly unwinds back to `main()`. diff --git a/doc/src/manual/faq.md b/doc/src/manual/faq.md index f3373f5a32ee5..ac7e6e81e5d70 100644 --- a/doc/src/manual/faq.md +++ b/doc/src/manual/faq.md @@ -443,7 +443,7 @@ julia> sqrt(-2.0+0im) ### How can I constrain or compute type parameters? The parameters of a [parametric type](@ref Parametric-Types) can hold either -types or bits values, and the type itself chooses how it makes use of these parameters. +types or bits values, and the type itself chooses how it makes use of these parameters. For example, `Array{Float64, 2}` is parameterized by the type `Float64` to express its element type and the integer value `2` to express its number of dimensions. When defining your own parametric type, you can use subtype constraints to declare that a diff --git a/doc/src/manual/integers-and-floating-point-numbers.md b/doc/src/manual/integers-and-floating-point-numbers.md index 24c7a8c5a0eeb..2d073b83aec0a 100644 --- a/doc/src/manual/integers-and-floating-point-numbers.md +++ b/doc/src/manual/integers-and-floating-point-numbers.md @@ -21,15 +21,15 @@ The following are Julia's primitive numeric types: | Type | Signed? | Number of bits | Smallest value | Largest value | |:----------------- |:------- |:-------------- |:-------------- |:------------- | | [`Int8`](@ref) | ✓ | 8 | -2^7 | 2^7 - 1 | -| [`UInt8`](@ref) |   | 8 | 0 | 2^8 - 1 | +| [`UInt8`](@ref) | | 8 | 0 | 2^8 - 1 | | [`Int16`](@ref) | ✓ | 16 | -2^15 | 2^15 - 1 | -| [`UInt16`](@ref) |   | 16 | 0 | 2^16 - 1 | +| [`UInt16`](@ref) | | 16 | 0 | 2^16 - 1 | | [`Int32`](@ref) | ✓ | 32 | -2^31 | 2^31 - 1 | -| [`UInt32`](@ref) |   | 32 | 0 | 2^32 - 1 | +| [`UInt32`](@ref) | | 32 | 0 | 2^32 - 1 | | [`Int64`](@ref) | ✓ | 64 | -2^63 | 2^63 - 1 | -| [`UInt64`](@ref) |   | 64 | 0 | 2^64 - 1 | +| [`UInt64`](@ref) | | 64 | 0 | 2^64 - 1 | | [`Int128`](@ref) | ✓ | 128 | -2^127 | 2^127 - 1 | -| [`UInt128`](@ref) |   | 128 | 0 | 2^128 - 1 | +| [`UInt128`](@ref) | | 128 | 0 | 2^128 - 1 | | [`Bool`](@ref) | N/A | 8 | `false` (0) | `true` (1) | * **Floating-point types:** diff --git a/doc/src/manual/interfaces.md b/doc/src/manual/interfaces.md index 2b790a6546ff3..30ee82e3040b0 100644 --- a/doc/src/manual/interfaces.md +++ b/doc/src/manual/interfaces.md @@ -7,10 +7,10 @@ to generically build upon those behaviors. ## [Iteration](@id man-interface-iteration) -| Required methods |   | Brief description | +| Required methods | | Brief description | |:------------------------------ |:---------------------- |:------------------------------------------------------------------------------------- | -| `iterate(iter)` |   | Returns either a tuple of the first item and initial state or [`nothing`](@ref) if empty | -| `iterate(iter, state)` |   | Returns either a tuple of the next item and next state or `nothing` if no items remain | +| `iterate(iter)` | | Returns either a tuple of the first item and initial state or [`nothing`](@ref) if empty | +| `iterate(iter, state)` | | Returns either a tuple of the next item and next state or `nothing` if no items remain | | **Important optional methods** | **Default definition** | **Brief description** | | `Base.IteratorSize(IterType)` | `Base.HasLength()` | One of `Base.HasLength()`, `Base.HasShape{N}()`, `Base.IsInfinite()`, or `Base.SizeUnknown()` as appropriate | | `Base.IteratorEltype(IterType)`| `Base.HasEltype()` | Either `Base.EltypeUnknown()` or `Base.HasEltype()` as appropriate | @@ -221,13 +221,13 @@ ourselves, we can officially define it as a subtype of an [`AbstractArray`](@ref ## [Abstract Arrays](@id man-interface-array) -| Methods to implement |   | Brief description | +| Methods to implement | | Brief description | |:----------------------------------------------- |:-------------------------------------- |:------------------------------------------------------------------------------------- | -| `size(A)` |   | Returns a tuple containing the dimensions of `A` | -| `getindex(A, i::Int)` |   | (if `IndexLinear`) Linear scalar indexing | -| `getindex(A, I::Vararg{Int, N})` |   | (if `IndexCartesian`, where `N = ndims(A)`) N-dimensional scalar indexing | -| `setindex!(A, v, i::Int)` |   | (if `IndexLinear`) Scalar indexed assignment | -| `setindex!(A, v, I::Vararg{Int, N})` |   | (if `IndexCartesian`, where `N = ndims(A)`) N-dimensional scalar indexed assignment | +| `size(A)` | | Returns a tuple containing the dimensions of `A` | +| `getindex(A, i::Int)` | | (if `IndexLinear`) Linear scalar indexing | +| `getindex(A, I::Vararg{Int, N})` | | (if `IndexCartesian`, where `N = ndims(A)`) N-dimensional scalar indexing | +| `setindex!(A, v, i::Int)` | | (if `IndexLinear`) Scalar indexed assignment | +| `setindex!(A, v, I::Vararg{Int, N})` | | (if `IndexCartesian`, where `N = ndims(A)`) N-dimensional scalar indexed assignment | | **Optional methods** | **Default definition** | **Brief description** | | `IndexStyle(::Type)` | `IndexCartesian()` | Returns either `IndexLinear()` or `IndexCartesian()`. See the description below. | | `getindex(A, I...)` | defined in terms of scalar `getindex` | [Multidimensional and nonscalar indexing](@ref man-array-indexing) | diff --git a/doc/src/manual/variables-and-scoping.md b/doc/src/manual/variables-and-scoping.md index 6e94037f3e564..35022d788aa67 100644 --- a/doc/src/manual/variables-and-scoping.md +++ b/doc/src/manual/variables-and-scoping.md @@ -124,7 +124,7 @@ man-scope-table) for a complete list). If such a block is syntactically nested inside of another local scope, the scope it creates is nested inside of all the local scopes that it appears within, which are all ultimately nested inside of the global scope of the module in which the code is evaluated. Variables in -outer scopes are visible from any scope they contain — meaning that they can be +outer scopes are visible from any scope they contain — meaning that they can be read and written in inner scopes — unless there is a local variable with the same name that "shadows" the outer variable of the same name. This is true even if the outer local is declared after (in the sense of textually below) an inner @@ -532,7 +532,7 @@ prints this very direct warning: This addresses both issues while preserving the "programming at scale" benefits of the 1.0 behavior: global variables have no spooky effect on the meaning of code that may be far away; in the REPL copy-and-paste debugging works and beginners don't have any issues; any time someone either forgets -a `global` annotation or accidentally shadows an existing global with a local in a soft scope, +a `global` annotation or accidentally shadows an existing global with a local in a soft scope, which would be confusing anyway, they get a nice clear warning. An important property of this design is that any code that executes in a file without a warning will diff --git a/src/dlload.c b/src/dlload.c index 33afe62acad90..d8bc2f374ef36 100644 --- a/src/dlload.c +++ b/src/dlload.c @@ -156,7 +156,7 @@ JL_DLLEXPORT void *jl_load_dynamic_library(const char *modname, unsigned flags, void *handle; int abspath; int is_atpath; - // number of extensions to try — if modname already ends with the + // number of extensions to try — if modname already ends with the // standard extension, then we don't try adding additional extensions int n_extensions = endswith_extension(modname) ? 1 : N_EXTENSIONS; diff --git a/stdlib/DelimitedFiles/test/runtests.jl b/stdlib/DelimitedFiles/test/runtests.jl index 69285b6c58fb0..3bb8381354c55 100644 --- a/stdlib/DelimitedFiles/test/runtests.jl +++ b/stdlib/DelimitedFiles/test/runtests.jl @@ -194,7 +194,7 @@ end "Ireland", "Sinead O'Connor", "Éire", "Sinéad O'Connor", "Israel", "Yehoram Gaon", "ישראל", "יהורם גאון", "Italy", "Fabrizio DeAndre", "Italia", "Fabrizio De André", - "Japan", "KUBOTA Toshinobu", "日本", "久保田    利伸", + "Japan", "KUBOTA Toshinobu", "日本", "久保田 利伸", "Japan", "HAYASHIBARA Megumi", "日本", "林原 めぐみ", "Japan", "Mori Ogai", "日本", "森鷗外", "Japan", "Tex Texin", "日本", "テクス テクサン", diff --git a/stdlib/LinearAlgebra/test/blas.jl b/stdlib/LinearAlgebra/test/blas.jl index 117d7dc103605..0a2ac87c8026d 100644 --- a/stdlib/LinearAlgebra/test/blas.jl +++ b/stdlib/LinearAlgebra/test/blas.jl @@ -562,7 +562,7 @@ end @testset "strided interface blas" begin for elty in (Float32, Float64, ComplexF32, ComplexF64) - # Level 1 + # Level 1 x = WrappedArray(elty[1, 2, 3, 4]) y = WrappedArray(elty[5, 6, 7, 8]) BLAS.blascopy!(2, x, 1, y, 2) @@ -622,7 +622,7 @@ end x = WrappedArray(elty[1, 2, 3, 4]) y = WrappedArray(elty[5, 6, 7, 8]) @test BLAS.dot(2, x, 1, y, 2) == elty(19) - # Level 2 + # Level 2 A = WrappedArray(elty[1 2; 3 4]) x = WrappedArray(elty[1, 2]) y = WrappedArray(elty[3, 4]) diff --git a/stdlib/REPL/docs/src/index.md b/stdlib/REPL/docs/src/index.md index 1d1feea6d5a09..ff05723102ae0 100644 --- a/stdlib/REPL/docs/src/index.md +++ b/stdlib/REPL/docs/src/index.md @@ -225,7 +225,7 @@ to do so), or pressing Esc and then the key. | Keybinding | Description | |:------------------- |:---------------------------------------------------------------------------------------------------------- | -| **Program control** |   | +| **Program control** | | | `^D` | Exit (when buffer is empty) | | `^C` | Interrupt or cancel | | `^L` | Clear console screen | @@ -233,7 +233,7 @@ to do so), or pressing Esc and then the key. | meta-Return/Enter | Insert new line without executing it | | `?` or `;` | Enter help or shell mode (when at start of a line) | | `^R`, `^S` | Incremental history search, described above | -| **Cursor movement** |   | +| **Cursor movement** | | | Right arrow, `^F` | Move right one character | | Left arrow, `^B` | Move left one character | | ctrl-Right, `meta-F`| Move right one word | @@ -251,7 +251,7 @@ to do so), or pressing Esc and then the key. | `^-Space ^-Space` | Set the "mark" in the editing region and make the region "active", i.e. highlighted | | `^G` | De-activate the region (i.e. make it not highlighted) | | `^X^X` | Exchange the current position with the mark | -| **Editing** |   | +| **Editing** | | | Backspace, `^H` | Delete the previous character, or the whole region when it's active | | Delete, `^D` | Forward delete one character (when buffer has text) | | meta-Backspace | Delete the previous word | diff --git a/test/file.jl b/test/file.jl index a7c0b6dca125d..2c09b3edaed2e 100644 --- a/test/file.jl +++ b/test/file.jl @@ -193,7 +193,7 @@ end t = i % 2 == 0 ? mktempfile() : mktempdir() push!(temps, t) @test ispath(t) - @test length(TEMP_CLEANUP) == i  + @test length(TEMP_CLEANUP) == i @test TEMP_CLEANUP_MAX[] == n # delete 1/3 of the temp paths i % 3 == 0 && rm(t, recursive=true, force=true) diff --git a/test/misc.jl b/test/misc.jl index efc647667f4b6..1c94b9b8f78a5 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -439,10 +439,10 @@ V8 = [ ([0xe1,0x88,0xb4],[0x1234]) ([0xea,0xaf,0x8d],[0xabcd]) ([0xed,0x9f,0xbf],[0xd7ff]) - ([0xed,0xa0,0x80],[0xd800]) # invalid code point – high surrogate - ([0xed,0xaf,0xbf],[0xdbff]) # invalid code point – high surrogate - ([0xed,0xb0,0x80],[0xdc00]) # invalid code point – low surrogate - ([0xed,0xbf,0xbf],[0xdfff]) # invalid code point – low surrogate + ([0xed,0xa0,0x80],[0xd800]) # invalid code point – high surrogate + ([0xed,0xaf,0xbf],[0xdbff]) # invalid code point – high surrogate + ([0xed,0xb0,0x80],[0xdc00]) # invalid code point – low surrogate + ([0xed,0xbf,0xbf],[0xdfff]) # invalid code point – low surrogate ([0xee,0x80,0x80],[0xe000]) ([0xef,0xbf,0xbf],[0xffff]) # 4-byte diff --git a/test/show.jl b/test/show.jl index ba9f227e53e52..9a784c01528ef 100644 --- a/test/show.jl +++ b/test/show.jl @@ -528,7 +528,7 @@ module M1 var"#foo#"() = 2 end module var"#43932#" end @test endswith(sprint(show, var"#43932#"), ".var\"#43932#\"") -# issue #12477 +# issue #12477 @test sprint(show, Union{Int64, Int32, Int16, Int8, Float64}) == "Union{Float64, Int16, Int32, Int64, Int8}" # Function and array reference precedence @@ -843,7 +843,7 @@ end end lower = length("\"\" ⋯ $(ncodeunits(str)) bytes ⋯ \"\"") limit = max(limit, lower) - if length(str) + 2 ≤ limit + if length(str) + 2 ≤ limit @test eval(Meta.parse(out)) == str else @test limit-!isascii(str) <= length(out) <= limit diff --git a/test/strings/basic.jl b/test/strings/basic.jl index b20c18e636db7..0cef6569d3aac 100644 --- a/test/strings/basic.jl +++ b/test/strings/basic.jl @@ -854,7 +854,7 @@ end p = prevind(s, p) @test prevind(s, x, j) == p end - if n ≤ ncodeunits(s) + if n ≤ ncodeunits(s) n = nextind(s, n) @test nextind(s, x, j) == n end