Skip to content

Commit 621d8c8

Browse files
mjohanse-emrMichael Johansen
andauthored
Remove int range checking from Scalar constructor (#178)
Signed-off-by: Michael Johansen <[email protected]> Co-authored-by: Michael Johansen <[email protected]>
1 parent 8e62a32 commit 621d8c8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/nitypes/scalar.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from typing_extensions import TypeVar, final
1515

16-
from nitypes._exceptions import invalid_arg_type, invalid_arg_value
16+
from nitypes._exceptions import invalid_arg_type
1717
from nitypes.waveform._extended_properties import UNIT_DESCRIPTION
1818

1919
if TYPE_CHECKING:
@@ -76,11 +76,6 @@ def __init__(
7676
if not isinstance(units, str):
7777
raise invalid_arg_type("units", "str", units)
7878

79-
# The ScalarData proto type only supports 32 bit integers. Make sure we're in range.
80-
if isinstance(value, int):
81-
if value <= -0x80000000 or value >= 0x7FFFFFFF:
82-
raise invalid_arg_value("integer scalar value", "within the range of Int32", value)
83-
8479
self._value = value
8580
self._extended_properties = ExtendedPropertyDictionary()
8681
self._extended_properties[UNIT_DESCRIPTION] = units

0 commit comments

Comments
 (0)