Skip to content

Commit 4dd7302

Browse files
authored
Add commas to bare usage of "however" where appropriate (#12119)
1 parent a6d857c commit 4dd7302

File tree

13 files changed

+16
-16
lines changed

13 files changed

+16
-16
lines changed

lib/elixir/lib/code.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,8 @@ defmodule Code do
615615
The formatter respects the input format in some cases. Those are
616616
listed below:
617617
618-
* Insignificant digits in numbers are kept as is. The formatter
619-
however always inserts underscores for decimal numbers with more
618+
* Insignificant digits in numbers are kept as is. The formatter,
619+
however, always inserts underscores for decimal numbers with more
620620
than 5 digits and converts hexadecimal digits to uppercase
621621
622622
* Strings, charlists, atoms and sigils are kept as is. No character

lib/elixir/lib/exception.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ defmodule ArgumentError do
830830

831831
not is_atom(function) ->
832832
"you attempted to apply a function named #{inspect(function)} on module #{inspect(module)}. " <>
833-
"However #{inspect(function)} is not a valid function name. Function names (the second argument " <>
833+
"However, #{inspect(function)} is not a valid function name. Function names (the second argument " <>
834834
"of apply) must always be an atom"
835835
end
836836

@@ -1128,7 +1128,7 @@ defmodule UndefinedFunctionError do
11281128
def hint_for_loaded_module(module, function, arity, exports) do
11291129
cond do
11301130
macro_exported?(module, function, arity) ->
1131-
". However there is a macro with the same name and arity. " <>
1131+
". However, there is a macro with the same name and arity. " <>
11321132
"Be sure to require #{inspect(module)} if you intend to invoke this macro"
11331133

11341134
message = otp_obsolete(module, function, arity) ->

lib/elixir/lib/inspect.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ defprotocol Inspect do
119119
Elixir will raise an `ArgumentError` error and will automatically fall back
120120
to a raw representation for printing the structure.
121121
122-
You can however access the underlying error by invoking the `Inspect`
122+
You can, however, access the underlying error by invoking the `Inspect`
123123
implementation directly. For example, to test `Inspect.MapSet` above,
124124
you can invoke it as:
125125

lib/elixir/lib/inspect/algebra.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ defmodule Inspect.Algebra do
226226
227227
This implementation provides two types of breaks: `:strict` and `:flex`.
228228
When a group does not fit, all strict breaks are treated as newlines.
229-
Flex breaks however are re-evaluated on every occurrence and may still
229+
Flex breaks, however, are re-evaluated on every occurrence and may still
230230
be rendered flat. See `break/1` and `flex_break/1` for more information.
231231
232232
This implementation also adds `force_unfit/1` and `next_break_fits/2` which

lib/elixir/lib/keyword.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule Keyword do
3333
## Duplicate keys and ordering
3434
3535
A keyword may have duplicate keys so it is not strictly a key-value
36-
data type. However most of the functions in this module work on a
36+
data type. However, most of the functions in this module work on a
3737
key-value structure and behave similar to the functions you would
3838
find in the `Map` module. For example, `Keyword.get/3` will get the first
3939
entry matching the given key, regardless if duplicate entries exist.

lib/elixir/lib/protocol.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ defmodule Protocol do
548548
549549
This function does not load the protocol at any point
550550
nor loads the new bytecode for the compiled module.
551-
However each implementation must be available and
551+
However, each implementation must be available and
552552
it will be loaded.
553553
"""
554554
@spec consolidate(module, [module]) ::

lib/elixir/lib/range.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ defmodule Range do
2626
defined based on the first and last position of the
2727
range, If `first >= last`, it will be an increasing range
2828
with a step of 1. Otherwise, it is a decreasing range.
29-
Note however implicit decreasing ranges are deprecated.
29+
Note, however, implicit decreasing ranges are deprecated.
3030
Therefore, if you need a decreasing range from `3` to `1`,
3131
prefer to write `3..1//-1` instead.
3232

lib/elixir/pages/unicode-syntax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ As of Elixir 1.14, some codepoints in `\p{Identifier_Status=Restricted}` are *no
149149

150150
Initially this is only done to translate MICRO SIGN `µ` to Greek lowercase mu, `μ`.
151151

152-
This is not a modification of UTS39 clauses C1 (General Security Profile) or C2 (Confusability Detection); however it is a documented modification of C3, 'Mixed-Script detection'.
152+
This is not a modification of UTS39 clauses C1 (General Security Profile) or C2 (Confusability Detection); however, it is a documented modification of C3, 'Mixed-Script detection'.
153153

154154
Mixed-script detection is modified by these normalizations to the extent that the normalized codepoint is given the union of scriptsets from both characters.
155155

lib/elixir/src/elixir_bitstring.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extract_meta({_, Meta, _}, _) -> Meta;
5555
extract_meta(_, Meta) -> Meta.
5656

5757
%% Variables defined outside the binary can be accounted
58-
%% on subparts, however we can't assign new variables.
58+
%% on subparts; however, we can't assign new variables.
5959
is_match_size([_ | _], #{context := match}) -> true;
6060
is_match_size(_, _) -> false.
6161

lib/elixir/test/elixir/exception_test.exs

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ defmodule ExceptionTest do
491491
"module.function(), make sure the left-hand side of the dot is a module atom"
492492

493493
assert blame_message([], &apply(Kernel, &1, [1, 2])) ==
494-
"you attempted to apply a function named [] on module Kernel. However [] is not a valid function name. " <>
494+
"you attempted to apply a function named [] on module Kernel. However, [] is not a valid function name. " <>
495495
"Function names (the second argument of apply) must always be an atom"
496496

497497
assert blame_message(123, &apply(Kernel, :+, &1)) ==
@@ -546,7 +546,7 @@ defmodule ExceptionTest do
546546

547547
test "annotates undefined function clause error with macro hints" do
548548
assert blame_message(Integer, & &1.is_odd(1)) ==
549-
"function Integer.is_odd/1 is undefined or private. However there is " <>
549+
"function Integer.is_odd/1 is undefined or private. However, there is " <>
550550
"a macro with the same name and arity. Be sure to require Integer if " <>
551551
"you intend to invoke this macro"
552552
end

lib/iex/lib/iex.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ defmodule IEx do
146146
2 | |> IO.puts()
147147
| ^
148148
149-
Note however the above does not work for `+/2` and `-/2`, as they
149+
Note, however, the above does not work for `+/2` and `-/2`, as they
150150
are ambiguous with the unary `+/1` and `-/1`:
151151
152152
iex(1)> 1

lib/mix/lib/mix/tasks/compile.elixir.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule Mix.Tasks.Compile.Elixir do
2020
A module may export a `__mix_recompile__?/0` function that can
2121
cause the module to be recompiled using custom rules. For example,
2222
`@external_resource` already adds a compile-time dependency on an
23-
external file, however to depend on a _dynamic_ list of files we
23+
external file, however, to depend on a _dynamic_ list of files we
2424
can do:
2525
2626
defmodule MyModule do

man/common

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ allows creating a node which can be connected to another node, escaping redundan
7373
.Pp
7474
The function
7575
.Sy Node.list/0
76-
allows getting the list of nodes connected to the target node, however the list won't include hidden nodes. Depending on the input parameter, the function
76+
allows getting the list of nodes connected to the target node; however, the list won't include hidden nodes. Depending on the input parameter, the function
7777
.Sy Node.list/1
7878
allows getting the list which contains only hidden nodes
7979
.Pq the parameter Ar :hidden

0 commit comments

Comments
 (0)