diff --git a/sensor_msgs_py/sensor_msgs_py/numpy_compat.py b/sensor_msgs_py/sensor_msgs_py/numpy_compat.py index 9e84261b..60ea95fa 100644 --- a/sensor_msgs_py/sensor_msgs_py/numpy_compat.py +++ b/sensor_msgs_py/sensor_msgs_py/numpy_compat.py @@ -63,7 +63,7 @@ def count_elem(dt): # optimization: avoid list comprehension if no subarray fields.extend(subfields) else: - fields.extend([(d, c, o + i*size) for d, c, o in subfields]) + fields.extend([(d, c, o + i * size) for d, c, o in subfields]) return fields diff --git a/sensor_msgs_py/sensor_msgs_py/point_cloud2.py b/sensor_msgs_py/sensor_msgs_py/point_cloud2.py index 2e06be96..07f8ec3f 100644 --- a/sensor_msgs_py/sensor_msgs_py/point_cloud2.py +++ b/sensor_msgs_py/sensor_msgs_py/point_cloud2.py @@ -226,9 +226,9 @@ def dtype_from_fields(fields: Iterable[PointField], point_step: Optional[int] = # Create dtype dtype_dict = { - 'names': field_names, - 'formats': field_datatypes, - 'offsets': field_offsets + 'names': field_names, + 'formats': field_datatypes, + 'offsets': field_offsets } if point_step is not None: dtype_dict['itemsize'] = point_step