From dc11557f8503df1a8223c2f22f44a0c1a44350c9 Mon Sep 17 00:00:00 2001 From: Tom Harty Date: Thu, 28 Nov 2024 11:26:10 +0000 Subject: [PATCH] parameters: fix type checking --- ndscan/experiment/parameters.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndscan/experiment/parameters.py b/ndscan/experiment/parameters.py index 84ee12a0..2004ffae 100644 --- a/ndscan/experiment/parameters.py +++ b/ndscan/experiment/parameters.py @@ -10,11 +10,14 @@ from artiq.language import host_only, portable, units from enum import Enum from numpy import int32 -from typing import Any +from typing import Any, TYPE_CHECKING from ..utils import eval_param_default, GetDataset __all__ = ["FloatParam", "IntParam", "StringParam", "BoolParam", "EnumParam"] +if TYPE_CHECKING: + from .fragment import Fragment + class InvalidDefaultError(ValueError): """Raised when a default value is outside the specified range of valid parameter