From 64d412bca000e56d93d292a045a9987107ecce1e Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:51:34 +0100 Subject: [PATCH] FIX: update type hints after QRules `Fraction` implementation --- benchmarks/ampform.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/benchmarks/ampform.py b/benchmarks/ampform.py index f874fee2..f973bf57 100644 --- a/benchmarks/ampform.py +++ b/benchmarks/ampform.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Sequence from pprint import pprint -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Union import numpy as np import pytest @@ -17,10 +18,9 @@ from tensorwaves.function.sympy import create_parametrized_function if TYPE_CHECKING: - from collections.abc import Mapping, Sequence + from collections.abc import Mapping from ampform.helicity import HelicityModel - from qrules.combinatorics import StateDefinition from tensorwaves.function import ParametrizedBackendFunction from tensorwaves.interface import ( @@ -31,6 +31,8 @@ ParametrizedFunction, ) +StateDefinition = Union[str, tuple[str, Sequence[float]]] + def formulate_amplitude_model( formalism,