diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f5236bee..53d314a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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"] @@ -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] diff --git a/test/python/test_compilation_flow_profiles.py b/test/python/test_compilation_flow_profiles.py index cf324a73..d399989c 100644 --- a/test/python/test_compilation_flow_profiles.py +++ b/test/python/test_compilation_flow_profiles.py @@ -13,6 +13,7 @@ from importlib import resources import difflib +import locale import pytest @@ -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