Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️🪝 update pre-commit hooks #395

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ repos:

# Python linting and formatting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.3
rev: v0.4.4
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -82,7 +82,7 @@ repos:

# Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.4
rev: v18.1.5
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down
5 changes: 4 additions & 1 deletion test/python/test_compilation_flow_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from importlib import resources

import difflib
import locale

import pytest

Expand Down Expand Up @@ -64,7 +65,9 @@ def test_generated_profiles_are_still_valid(optimization_level: int, ancilla_mod
return

ref_profile = path.read_text().splitlines(keepends=True)
gen_profile = Path(profile_name).read_text().splitlines(keepends=True)
gen_profile = (
Path(profile_name).read_text(encoding=locale.getpreferredencoding(False)).splitlines(keepends=True)
)
diff = difflib.unified_diff(ref_profile, gen_profile, fromfile="reference", tofile="generated", n=0)
num_diffs = sum(
1
Expand Down
Loading