mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00
Fix typos found by codespell (#14863)
## Summary Just fix typos. ## Test Plan CI tests. --------- Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
3d9ac535e9
commit
59145098d6
34 changed files with 58 additions and 58 deletions
|
@ -6,7 +6,7 @@ def foo2(parameter_1, parameter_2, parameter_3, parameter_4, parameter_5, parame
|
|||
def foo3(parameter_1, parameter_2, parameter_3, parameter_4, parameter_5, parameter_6, parameter_7): pass
|
||||
def foo4(parameter_1, parameter_2, parameter_3, parameter_4, parameter_5, parameter_6, parameter_7): pass
|
||||
|
||||
# Adding some unformated code covering a wide range of syntaxes.
|
||||
# Adding some unformatted code covering a wide range of syntaxes.
|
||||
|
||||
if True:
|
||||
# Incorrectly indented prefix comments.
|
||||
|
|
|
@ -28,7 +28,7 @@ def foo3(
|
|||
|
||||
def foo4(parameter_1, parameter_2, parameter_3, parameter_4, parameter_5, parameter_6, parameter_7): pass
|
||||
|
||||
# Adding some unformated code covering a wide range of syntaxes.
|
||||
# Adding some unformatted code covering a wide range of syntaxes.
|
||||
|
||||
if True:
|
||||
# Incorrectly indented prefix comments.
|
||||
|
|
|
@ -19,7 +19,7 @@ z: (Short
|
|||
z: (int) = 2.3
|
||||
z: ((int)) = foo()
|
||||
|
||||
# In case I go for not enforcing parantheses, this might get improved at the same time
|
||||
# In case I go for not enforcing parentheses, this might get improved at the same time
|
||||
x = (
|
||||
z
|
||||
== 9999999999999999999999999999999999999999
|
||||
|
|
|
@ -28,7 +28,7 @@ z: Short | Short2 | Short3 | Short4 = 8
|
|||
z: int = 2.3
|
||||
z: int = foo()
|
||||
|
||||
# In case I go for not enforcing parantheses, this might get improved at the same time
|
||||
# In case I go for not enforcing parentheses, this might get improved at the same time
|
||||
x = (
|
||||
z
|
||||
== 9999999999999999999999999999999999999999
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Regresssion test for https://github.com/astral-sh/ruff/issues/11724
|
||||
# Regression test for https://github.com/astral-sh/ruff/issues/11724
|
||||
|
||||
'''
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ b"aaaaaaaaa" b"bbbbbbbbbbbbbbbbbbbb" # Join
|
|||
# F-strings
|
||||
##############################################################################
|
||||
|
||||
# Escape `{` and `}` when marging an f-string with a string
|
||||
# Escape `{` and `}` when merging an f-string with a string
|
||||
"a {not_a_variable}" f"b {10}" "c"
|
||||
|
||||
# Join, and break expressions
|
||||
|
@ -96,7 +96,7 @@ f"{f'''test ' '''}" f'{f"""other " """}'
|
|||
f"{10 + len('bar')=}" f"{10 + len('bar')=}"
|
||||
f"{10 + len('bar')=}" f'no debug{10}' f"{10 + len('bar')=}"
|
||||
|
||||
# We can't savely merge this pre Python 3.12 without altering the debug expression.
|
||||
# We can't safely merge this pre Python 3.12 without altering the debug expression.
|
||||
f"{10 + len('bar')=}" f'{10 + len("bar")=}'
|
||||
|
||||
|
||||
|
@ -259,7 +259,7 @@ def short_docstring():
|
|||
"Implicit" "concatenated" "docstring"
|
||||
|
||||
def long_docstring():
|
||||
"Loooooooooooooooooooooong" "doooooooooooooooooooocstriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing" "exceding the line width" "but it should be concatenated anyways because it is single line"
|
||||
"Loooooooooooooooooooooong" "doooooooooooooooooooocstriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing" "exceeding the line width" "but it should be concatenated anyways because it is single line"
|
||||
|
||||
def docstring_with_leading_whitespace():
|
||||
" This is a " "implicit" "concatenated" "docstring"
|
||||
|
|
|
@ -13,7 +13,7 @@ print("after" )
|
|||
# The if header and the print statement together are longer than 100 characters.
|
||||
# The print statement should either be wrapped to fit at the end of the if statement, or be converted to a
|
||||
# suite body
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be intented" )<RANGE_END>
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be indented" )<RANGE_END>
|
||||
|
||||
# This print statement is too-long even when intented. It should be wrapped
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be intented", "more content to make it exceed the 88 chars limit")<RANGE_END>
|
||||
# This print statement is too long even when indented. It should be wrapped
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be indented", "more content to make it exceed the 88 chars limit")<RANGE_END>
|
||||
|
|
|
@ -54,7 +54,7 @@ def test_return_union_with_elements_exceeding_length(
|
|||
|
||||
|
||||
#########################################################################################
|
||||
# Multiline stirngs (NeedsParentheses::Never)
|
||||
# Multiline strings (NeedsParentheses::Never)
|
||||
#########################################################################################
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ pub(crate) fn is_f_string_formatting_enabled(context: &PyFormatContext) -> bool
|
|||
}
|
||||
|
||||
/// See [#13539](https://github.com/astral-sh/ruff/pull/13539)
|
||||
/// Remove `Quoting` when stabalizing this preview style.
|
||||
/// Remove `Quoting` when stabilizing this preview style.
|
||||
pub(crate) fn is_f_string_implicit_concatenated_string_literal_quotes_enabled(
|
||||
context: &PyFormatContext,
|
||||
) -> bool {
|
||||
|
|
|
@ -27,7 +27,7 @@ z: (Short
|
|||
z: (int) = 2.3
|
||||
z: ((int)) = foo()
|
||||
|
||||
# In case I go for not enforcing parantheses, this might get improved at the same time
|
||||
# In case I go for not enforcing parentheses, this might get improved at the same time
|
||||
x = (
|
||||
z
|
||||
== 9999999999999999999999999999999999999999
|
||||
|
@ -166,7 +166,7 @@ z: Short | Short2 | Short3 | Short4 = 8
|
|||
z: int = 2.3
|
||||
z: int = foo()
|
||||
|
||||
# In case I go for not enforcing parantheses, this might get improved at the same time
|
||||
# In case I go for not enforcing parentheses, this might get improved at the same time
|
||||
x = (
|
||||
z
|
||||
== 9999999999999999999999999999999999999999
|
||||
|
@ -270,7 +270,7 @@ z: Short | Short2 | Short3 | Short4 = 8
|
|||
z: int = 2.3
|
||||
z: int = foo()
|
||||
|
||||
# In case I go for not enforcing parantheses, this might get improved at the same time
|
||||
# In case I go for not enforcing parentheses, this might get improved at the same time
|
||||
x = (
|
||||
z
|
||||
== 9999999999999999999999999999999999999999
|
||||
|
|
|
@ -5,7 +5,7 @@ snapshot_kind: text
|
|||
---
|
||||
## Input
|
||||
```python
|
||||
# Regresssion test for https://github.com/astral-sh/ruff/issues/11724
|
||||
# Regression test for https://github.com/astral-sh/ruff/issues/11724
|
||||
|
||||
'''
|
||||
|
||||
|
@ -15,7 +15,7 @@ snapshot_kind: text
|
|||
|
||||
## Output
|
||||
```python
|
||||
# Regresssion test for https://github.com/astral-sh/ruff/issues/11724
|
||||
# Regression test for https://github.com/astral-sh/ruff/issues/11724
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ b"aaaaaaaaa" b"bbbbbbbbbbbbbbbbbbbb" # Join
|
|||
# F-strings
|
||||
##############################################################################
|
||||
|
||||
# Escape `{` and `}` when marging an f-string with a string
|
||||
# Escape `{` and `}` when merging an f-string with a string
|
||||
"a {not_a_variable}" f"b {10}" "c"
|
||||
|
||||
# Join, and break expressions
|
||||
|
@ -102,7 +102,7 @@ f"{f'''test ' '''}" f'{f"""other " """}'
|
|||
f"{10 + len('bar')=}" f"{10 + len('bar')=}"
|
||||
f"{10 + len('bar')=}" f'no debug{10}' f"{10 + len('bar')=}"
|
||||
|
||||
# We can't savely merge this pre Python 3.12 without altering the debug expression.
|
||||
# We can't safely merge this pre Python 3.12 without altering the debug expression.
|
||||
f"{10 + len('bar')=}" f'{10 + len("bar")=}'
|
||||
|
||||
|
||||
|
@ -265,7 +265,7 @@ def short_docstring():
|
|||
"Implicit" "concatenated" "docstring"
|
||||
|
||||
def long_docstring():
|
||||
"Loooooooooooooooooooooong" "doooooooooooooooooooocstriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing" "exceding the line width" "but it should be concatenated anyways because it is single line"
|
||||
"Loooooooooooooooooooooong" "doooooooooooooooooooocstriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing" "exceeding the line width" "but it should be concatenated anyways because it is single line"
|
||||
|
||||
def docstring_with_leading_whitespace():
|
||||
" This is a " "implicit" "concatenated" "docstring"
|
||||
|
@ -427,7 +427,7 @@ b"aaaaaaaaabbbbbbbbbbbbbbbbbbbb" # Join
|
|||
# F-strings
|
||||
##############################################################################
|
||||
|
||||
# Escape `{` and `}` when marging an f-string with a string
|
||||
# Escape `{` and `}` when merging an f-string with a string
|
||||
f"a {{not_a_variable}}b {10}c"
|
||||
|
||||
# Join, and break expressions
|
||||
|
@ -463,7 +463,7 @@ f"{f'''test ' '''}" f'{f"""other " """}'
|
|||
f"{10 + len('bar')=}{10 + len('bar')=}"
|
||||
f"{10 + len('bar')=}no debug{10}{10 + len('bar')=}"
|
||||
|
||||
# We can't savely merge this pre Python 3.12 without altering the debug expression.
|
||||
# We can't safely merge this pre Python 3.12 without altering the debug expression.
|
||||
f"{10 + len('bar')=}" f'{10 + len("bar")=}'
|
||||
|
||||
|
||||
|
@ -690,7 +690,7 @@ def short_docstring():
|
|||
|
||||
|
||||
def long_docstring():
|
||||
"Loooooooooooooooooooooongdoooooooooooooooooooocstriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiingexceding the line widthbut it should be concatenated anyways because it is single line"
|
||||
"Loooooooooooooooooooooongdoooooooooooooooooooocstriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiingexceeding the line widthbut it should be concatenated anyways because it is single line"
|
||||
|
||||
|
||||
def docstring_with_leading_whitespace():
|
||||
|
|
|
@ -20,10 +20,10 @@ print("after" )
|
|||
# The if header and the print statement together are longer than 100 characters.
|
||||
# The print statement should either be wrapped to fit at the end of the if statement, or be converted to a
|
||||
# suite body
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be intented" )<RANGE_END>
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be indented" )<RANGE_END>
|
||||
|
||||
# This print statement is too-long even when intented. It should be wrapped
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be intented", "more content to make it exceed the 88 chars limit")<RANGE_END>
|
||||
# This print statement is too long even when indented. It should be wrapped
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd: <RANGE_START>print("aaaa long body, should wrap or be indented", "more content to make it exceed the 88 chars limit")<RANGE_END>
|
||||
```
|
||||
|
||||
## Output
|
||||
|
@ -48,12 +48,12 @@ print("after" )
|
|||
# The print statement should either be wrapped to fit at the end of the if statement, or be converted to a
|
||||
# suite body
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd:
|
||||
print("aaaa long body, should wrap or be intented")
|
||||
print("aaaa long body, should wrap or be indented")
|
||||
|
||||
# This print statement is too-long even when intented. It should be wrapped
|
||||
# This print statement is too long even when indented. It should be wrapped
|
||||
if aaaaaaaaaaaa + bbbbbbbbbbbbbb + cccccccccccccccccc + ddd:
|
||||
print(
|
||||
"aaaa long body, should wrap or be intented",
|
||||
"aaaa long body, should wrap or be indented",
|
||||
"more content to make it exceed the 88 chars limit",
|
||||
)
|
||||
```
|
||||
|
|
|
@ -61,7 +61,7 @@ def test_return_union_with_elements_exceeding_length(
|
|||
|
||||
|
||||
#########################################################################################
|
||||
# Multiline stirngs (NeedsParentheses::Never)
|
||||
# Multiline strings (NeedsParentheses::Never)
|
||||
#########################################################################################
|
||||
|
||||
|
||||
|
@ -260,7 +260,7 @@ def test_return_union_with_elements_exceeding_length(
|
|||
|
||||
|
||||
#########################################################################################
|
||||
# Multiline stirngs (NeedsParentheses::Never)
|
||||
# Multiline strings (NeedsParentheses::Never)
|
||||
#########################################################################################
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue