Skip to content

Commit

Permalink
Fix incorrect type narrowing
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddieAkeroyd committed Dec 16, 2024
1 parent c145653 commit 3213282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/channel_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3213282

Please sign in to comment.