mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 13:33:50 +00:00
Don't add chaperone space after escaped quote in triple quote (#17216)
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / mkdocs (push) Waiting to run
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / mkdocs (push) Waiting to run
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
1a3b73720c
commit
1aad180aae
5 changed files with 307 additions and 11 deletions
66
crates/ruff_python_formatter/resources/test/fixtures/ruff/docstring_chaperones.py
vendored
Normal file
66
crates/ruff_python_formatter/resources/test/fixtures/ruff/docstring_chaperones.py
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
def a1():
|
||||
"""Needs chaperone\\" """
|
||||
|
||||
def a2():
|
||||
"""Needs chaperone\\\ """
|
||||
|
||||
def a3():
|
||||
"""Needs chaperone" """
|
||||
|
||||
def a4():
|
||||
"""Needs chaperone\ """
|
||||
|
||||
def a5():
|
||||
"""Needs chaperone\\\\\ """
|
||||
|
||||
def a6():
|
||||
"""Needs chaperone\"" """
|
||||
|
||||
def a7():
|
||||
"""Doesn't need chaperone\""""
|
||||
|
||||
def a8():
|
||||
"""Doesn't need chaperone\'"""
|
||||
|
||||
def a9():
|
||||
"""Doesn't need chaperone\\\""""
|
||||
|
||||
def a10():
|
||||
"""Doesn't need chaperone\\\'"""
|
||||
|
||||
def a11():
|
||||
"""Doesn't need chaperone; all slashes escaped\\\\"""
|
||||
|
||||
def a12():
|
||||
"""Doesn't need chaperone\\"""
|
||||
|
||||
def a12():
|
||||
"""Doesn't need "chaperone" with contained quotes"""
|
||||
|
||||
def a13():
|
||||
"""Doesn't need chaperone\\\"\"\""""
|
||||
|
||||
def a14():
|
||||
"""Multiline docstring
|
||||
doesn't need chaperone
|
||||
"""
|
||||
|
||||
def a15():
|
||||
"""Multiline docstring
|
||||
doesn't need chaperone\
|
||||
"""
|
||||
|
||||
def a16():
|
||||
"""Multiline docstring with
|
||||
odd number of backslashes don't need chaperone\\\
|
||||
"""
|
||||
|
||||
def a17():
|
||||
"""Multiline docstring with
|
||||
even number of backslashes don't need chaperone\\\\
|
||||
"""
|
||||
|
||||
def a18():
|
||||
r"""Raw multiline docstring
|
||||
doesn't need chaperone\
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue