mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-09 22:25:09 +00:00
Update pre-commit dependencies (#15433)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
parent
7d20277111
commit
22edee2353
5 changed files with 15 additions and 13 deletions
|
@ -159,7 +159,7 @@ def format_contents(src: str) -> tuple[str, Sequence[CodeBlockError]]:
|
|||
case _:
|
||||
# We are only interested in checking the formatting of py or pyi code
|
||||
# blocks so we can return early if the language is not one of these.
|
||||
return f'{match["before"]}{match["code"]}{match["after"]}'
|
||||
return f"{match['before']}{match['code']}{match['after']}"
|
||||
|
||||
code = textwrap.dedent(match["code"])
|
||||
try:
|
||||
|
@ -170,7 +170,7 @@ def format_contents(src: str) -> tuple[str, Sequence[CodeBlockError]]:
|
|||
raise e
|
||||
|
||||
code = textwrap.indent(code, match["indent"])
|
||||
return f'{match["before"]}{code}{match["after"]}'
|
||||
return f"{match['before']}{code}{match['after']}"
|
||||
|
||||
src = SNIPPED_RE.sub(_snipped_match, src)
|
||||
return src, errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue