lab1 #1

Merged
hasslesstech merged 17 commits from lab1 into dev 2026-02-26 16:04:15 +02:00
Showing only changes of commit de8d2516f6 - Show all commits

View File

@ -204,14 +204,7 @@ class FileDatasource:
@staticmethod
def _parse_int16(s: str) -> int:
"""
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
return int(s)
@staticmethod
def _parse_acc(row: List[str]) -> Accelerometer: