PyLibMS 3.3.4__py3-none-any.whl → 3.3.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,8 @@ from dataclasses import dataclass
6
6
  from lms.common.lms_datatype import LMS_DataType
7
7
  from lms.titleconfig.definitions.value import ValueDefinition
8
8
 
9
- FLOAT_MIN = 1.17549435e-38
10
- FLOAT_MAX = 3.4028235e38
9
+ FLOAT32_MIN = -3.4028235e38
10
+ FLOAT32_MAX = 3.4028235e38
11
11
 
12
12
  type FieldValue = int | str | float | bool | bytes
13
13
 
@@ -162,7 +162,7 @@ def _verify_value(
162
162
  else:
163
163
  return
164
164
  case LMS_DataType.FLOAT32 if isinstance(value, float):
165
- _verify_number_is_in_range(value, FLOAT_MIN, FLOAT_MAX, definition)
165
+ _verify_number_is_in_range(value, FLOAT32_MIN, FLOAT32_MAX, definition)
166
166
  return
167
167
  case _ if isinstance(value, int):
168
168
  bits = datatype.stream_size * 8
@@ -38,9 +38,7 @@ class LMS_TagGroup:
38
38
  )
39
39
  for parameter in tag.parameter_definitions:
40
40
  if parameter.datatype is LMS_DataType.LIST:
41
- parameter.list_items = [
42
- item for i in parameter.list_indexes for item in list_items[i]
43
- ]
41
+ parameter.list_items = [list_items[i] for i in parameter.list_indexes]
44
42
 
45
43
 
46
44
  class LMS_TagDefinition:
@@ -12,6 +12,8 @@ def read_strings(reader: FileReader, four_byte_count: bool) -> list[str]:
12
12
 
13
13
  for offset in reader.read_offset_array(count):
14
14
  reader.seek(offset)
15
- string_list.append(reader.read_encoded_string())
15
+ string = reader.read_encoded_string()
16
+ print(string)
17
+ string_list.append(string)
16
18
 
17
19
  return string_list