From 0e0450bc8ccd90c885b3a4aba703b7546790c871 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Tue, 14 May 2024 01:35:38 -0700 Subject: [PATCH] Fix formatting in sensor_msgs_py (#248) Signed-off-by: Christophe Bedard --- sensor_msgs_py/sensor_msgs_py/numpy_compat.py | 2 +- sensor_msgs_py/sensor_msgs_py/point_cloud2.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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