Skip to content

Commit

Permalink
Update pre-commit dependencies (#15433)
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 7d20277 commit 22edee2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ repos:
pass_filenames: false # This makes it a lot faster

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff-format
- id: ruff
Expand All @@ -91,12 +91,12 @@ repos:
# zizmor detects security vulnerabilities in GitHub Actions workflows.
# Additional configuration for the tool is found in `.github/zizmor.yml`
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.0.0
rev: v1.0.1
hooks:
- id: zizmor

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
rev: 0.31.0
hooks:
- id: check-github-workflows

Expand Down
4 changes: 2 additions & 2 deletions scripts/check_docs_formatted.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _snipped_match(match: Match[str]) -> str:
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:
Expand All @@ -170,7 +170,7 @@ def _snipped_match(match: Match[str]) -> str:
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
Expand Down
6 changes: 3 additions & 3 deletions scripts/check_ecosystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ async def _get_commit(self: Self, checkout_dir: Path) -> str:
stdout=PIPE,
)
git_sha_stdout, _ = await git_sha_process.communicate()
assert (
await git_sha_process.wait() == 0
), f"Failed to retrieve commit sha at {checkout_dir}"
assert await git_sha_process.wait() == 0, (
f"Failed to retrieve commit sha at {checkout_dir}"
)
return git_sha_stdout.decode().strip()


Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def main() -> None:
{
"redirects": {
"redirect_maps": {
f'rules/{rule["code"]}.md': f'rules/{rule["name"]}.md'
f"rules/{rule['code']}.md": f"rules/{rule['name']}.md"
for rule in rules
},
},
Expand Down
10 changes: 6 additions & 4 deletions scripts/knot_benchmark/src/benchmark/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class Benchmark(enum.Enum):
def which_tool(name: str) -> Path:
tool = shutil.which(name)

assert (
tool is not None
), f"Tool {name} not found. Run the script with `uv run <script>`."
assert tool is not None, (
f"Tool {name} not found. Run the script with `uv run <script>`."
)

return Path(tool)

Expand Down Expand Up @@ -63,7 +63,9 @@ def __init__(self, *, path: Path | None = None):
(Path(__file__) / "../../../../../target/release/red_knot").resolve()
)

assert self.path.is_file(), f"Red Knot not found at '{self.path}'. Run `cargo build --release --bin red_knot`."
assert self.path.is_file(), (
f"Red Knot not found at '{self.path}'. Run `cargo build --release --bin red_knot`."
)

def cold_command(self, project: Project, venv: Venv) -> Command:
command = [str(self.path), "-v"]
Expand Down

0 comments on commit 22edee2

Please sign in to comment.