Skip to content

Commit

Permalink
Update dependency ruff to v0.9.1 (#15432)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <[email protected]>
  • Loading branch information
renovate[bot] and AlexWaygood authored Jan 11, 2025
1 parent 22edee2 commit c0259e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/requirements-insiders.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PyYAML==6.0.2
ruff==0.8.6
ruff==0.9.1
mkdocs==1.6.1
mkdocs-material @ git+ssh://[email protected]/astral-sh/mkdocs-material-insiders.git@39da7a5e761410349e9a1b8abf593b0cdd5453ff
mkdocs-redirects==1.2.2
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PyYAML==6.0.2
ruff==0.8.6
ruff==0.9.1
mkdocs==1.6.1
mkdocs-material==9.5.38
mkdocs-redirects==1.2.2
Expand Down
11 changes: 6 additions & 5 deletions scripts/check_docs_formatted.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Check code snippets in docs are formatted by black."""
"""Check code snippets in docs are formatted by Ruff."""

from __future__ import annotations

Expand All @@ -22,7 +22,7 @@
re.DOTALL | re.MULTILINE,
)

# For some rules, we don't want black to fix the formatting as this would "fix" the
# For some rules, we don't want Ruff to fix the formatting as this would "fix" the
# example.
KNOWN_FORMATTING_VIOLATIONS = [
"avoidable-escaped-quote",
Expand Down Expand Up @@ -72,6 +72,7 @@
"prohibited-trailing-comma",
"redundant-backslash",
"shebang-leading-whitespace",
"single-line-implicit-string-concatenation",
"surrounding-whitespace",
"too-few-spaces-before-inline-comment",
"too-many-blank-lines",
Expand All @@ -92,7 +93,7 @@
"whitespace-before-punctuation",
]

# For some docs, black is unable to parse the example code.
# For some docs, Ruff is unable to parse the example code.
KNOWN_PARSE_ERRORS = [
"blank-line-with-whitespace",
"indentation-with-invalid-multiple-comment",
Expand Down Expand Up @@ -237,9 +238,9 @@ def format_file(file: Path, error_known: bool, args: argparse.Namespace) -> int:


def main(argv: Sequence[str] | None = None) -> int:
"""Check code snippets in docs are formatted by black."""
"""Check code snippets in docs are formatted by Ruff."""
parser = argparse.ArgumentParser(
description="Check code snippets in docs are formatted by black.",
description="Check code snippets in docs are formatted by Ruff.",
)
parser.add_argument("--skip-errors", action="store_true")
parser.add_argument("--generate-docs", action="store_true")
Expand Down

0 comments on commit c0259e7

Please sign in to comment.