From 3213282b75031b8142e1e05a03df2ccb7e3d94ac Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Mon, 16 Dec 2024 12:58:16 +0000 Subject: [PATCH] Fix incorrect type narrowing --- utils/channel_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/channel_access.py b/utils/channel_access.py index db38070a..4b2c17e6 100644 --- a/utils/channel_access.py +++ b/utils/channel_access.py @@ -608,7 +608,7 @@ def assert_that_pv_is_within_range( """ def _condition(val: PVValue) -> bool: - assert isinstance(val, float) + assert isinstance(val, (int, float, str)) return min_value <= float(val) <= max_value message = "Expected PV value to between {} and {}".format(min_value, max_value)