Skip to content

Commit

Permalink
Fix typos in comments: assignement -> assignment (#3556)
Browse files Browse the repository at this point in the history
  • Loading branch information
yilei committed Feb 7, 2023
1 parent e74a052 commit 9c8464c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/black/linegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def _maybe_split_omitting_optional_parens(
# the split is right after `=`
and len(rhs.head.leaves) >= 2
and rhs.head.leaves[-2].type == token.EQUAL
# the left side of assignement contains brackets
# the left side of assignment contains brackets
and any(leaf.type in BRACKETS for leaf in rhs.head.leaves[:-1])
# the left side of assignment is short enough (the -1 is for the ending
# optional paren)
Expand Down
2 changes: 1 addition & 1 deletion tests/data/preview/prefer_rhs_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
] = lambda obj: obj.some_long_named_method()


# Make when when the left side of assignement plus the opening paren "... = (" is
# Make when when the left side of assignment plus the opening paren "... = (" is
# exactly line length limit + 1, it won't be split like that.
xxxxxxxxx_yyy_zzzzzzzz[
xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)
Expand Down
4 changes: 2 additions & 2 deletions tests/data/simple_cases/prefer_rhs_split_reformatted.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
arg2,
)

# Make when when the left side of assignement plus the opening paren "... = (" is
# Make when when the left side of assignment plus the opening paren "... = (" is
# exactly line length limit + 1, it won't be split like that.
xxxxxxxxx_yyy_zzzzzzzz[xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)] = 1

Expand All @@ -31,7 +31,7 @@
arg2,
)

# Make when when the left side of assignement plus the opening paren "... = (" is
# Make when when the left side of assignment plus the opening paren "... = (" is
# exactly line length limit + 1, it won't be split like that.
xxxxxxxxx_yyy_zzzzzzzz[
xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)
Expand Down

0 comments on commit 9c8464c

Please sign in to comment.