From a365f9bdb148b92f1561a5d1f33733abd476a4be Mon Sep 17 00:00:00 2001 From: grayson-helmholz Date: Mon, 11 Nov 2024 11:32:01 +0100 Subject: [PATCH] `Fraction`-literal in `StateTransitionManager`-constructor --- src/qrules/transition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qrules/transition.py b/src/qrules/transition.py index 52504ef1..d8f71dfc 100644 --- a/src/qrules/transition.py +++ b/src/qrules/transition.py @@ -8,6 +8,7 @@ from collections import defaultdict from copy import copy, deepcopy from enum import Enum, auto +from fractions import Fraction from multiprocessing import Pool from typing import TYPE_CHECKING, Literal, overload @@ -242,7 +243,7 @@ def __init__( # noqa: C901, PLR0912, PLR0917 reload_pdg: bool = False, mass_conservation_factor: float | None = 3.0, max_angular_momentum: int = 1, - max_spin_magnitude: float = 2.0, + max_spin_magnitude: Fraction = Fraction(2, 1), number_of_threads: int | None = None, ) -> None: if number_of_threads is not None: