mirror of
https://github.com/Rhinemann/IoT-Systems.git
synced 2026-03-14 20:50:39 +02:00
Remove int16 range check per review
This commit is contained in:
parent
3d94bf3008
commit
1643767094
@ -204,14 +204,7 @@ class FileDatasource:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _parse_int16(s: str) -> int:
|
def _parse_int16(s: str) -> int:
|
||||||
"""
|
return int(s)
|
||||||
Parse a signed 16-bit integer from string representation.
|
|
||||||
The file is expected to contain integer literals (e.g. "123", "-42").
|
|
||||||
"""
|
|
||||||
v = int(s)
|
|
||||||
if not FileDatasource.INT16_MIN <= v <= FileDatasource.INT16_MAX:
|
|
||||||
raise ValueError(f"Value {v} is out of signed 16-bit range")
|
|
||||||
return v
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _parse_acc(row: List[str]) -> Accelerometer:
|
def _parse_acc(row: List[str]) -> Accelerometer:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user