From 8992bb285fe7328ff29464a4104e0cd7220ab461 Mon Sep 17 00:00:00 2001 From: Bourgerie Quentin Date: Tue, 2 Jan 2024 18:29:16 +0100 Subject: [PATCH] chore(backend/frontend): Fixing formatting... --- .../concrete-cpu/implementation/src/c_api/wop_pbs.rs | 5 +---- frontends/concrete-python/tests/conftest.py | 9 ++++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backends/concrete-cpu/implementation/src/c_api/wop_pbs.rs b/backends/concrete-cpu/implementation/src/c_api/wop_pbs.rs index 055a949c76..753b19c710 100644 --- a/backends/concrete-cpu/implementation/src/c_api/wop_pbs.rs +++ b/backends/concrete-cpu/implementation/src/c_api/wop_pbs.rs @@ -318,10 +318,7 @@ pub unsafe extern "C" fn concrete_cpu_circuit_bootstrap_boolean_vertical_packing assert!(cbs_decomposition_level_count * cbs_decomposition_base_log <= 64); let mut lut_container = slice::from_raw_parts(lut, lut_size * lut_count); - let mut expanded_luts: Vec = vec![ - 0_u64; - fpksk_output_polynomial_size * lut_count - ]; + let mut expanded_luts: Vec = vec![0_u64; fpksk_output_polynomial_size * lut_count]; if lut_size < fpksk_output_polynomial_size { for luti in 0..lut_count { diff --git a/frontends/concrete-python/tests/conftest.py b/frontends/concrete-python/tests/conftest.py index dc58f6e644..60629ec8d8 100644 --- a/frontends/concrete-python/tests/conftest.py +++ b/frontends/concrete-python/tests/conftest.py @@ -5,13 +5,13 @@ import json import os import random +import warnings from copy import deepcopy from pathlib import Path from typing import Any, Callable, Dict, List, Tuple, Union import numpy as np import pytest -import warnings import tests from concrete import fhe @@ -303,8 +303,11 @@ def sanitize(values): if all(np.array_equal(e, a) for e, a in zip(expected, actual)): break - warnings.warn(UserWarning(f'Test fail ({i+1}/{retries}), regenerate keyset and retry')) - circuit.keygen(force=True, seed=i+1) + warnings.warn( + UserWarning(f"Test fail ({i+1}/{retries}), regenerate keyset and retry"), + stacklevel=2, + ) + circuit.keygen(force=True, seed=i + 1) if i == retries - 1: message = f"""