Skip to content

Commit

Permalink
⬆️🪝 update pre-commit hooks (#395)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.3 →
v0.4.4](astral-sh/ruff-pre-commit@v0.4.3...v0.4.4)
- [github.com/pre-commit/mirrors-clang-format: v18.1.4 →
v18.1.5](pre-commit/mirrors-clang-format@v18.1.4...v18.1.5)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed May 13, 2024
1 parent cc1d2c3 commit 6587e07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit 6587e07

Please sign in to comment.