From 00a3dbe93e71c9aa9a03f27fbe6882560a284b88 Mon Sep 17 00:00:00 2001 From: kalyan Date: Fri, 13 Oct 2023 10:57:05 +0530 Subject: [PATCH] fix formatting Signed-off-by: kalyan --- opensearch_py_ml/field_mappings.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opensearch_py_ml/field_mappings.py b/opensearch_py_ml/field_mappings.py index 85c217d10..5e7f41d5f 100644 --- a/opensearch_py_ml/field_mappings.py +++ b/opensearch_py_ml/field_mappings.py @@ -91,7 +91,9 @@ def is_numeric(self) -> bool: @property def is_timestamp(self) -> bool: - return is_datetime64_any_dtype(self.pd_dtype) or is_timedelta64_dtype(self.pd_dtype) + return is_datetime64_any_dtype(self.pd_dtype) or is_timedelta64_dtype( + self.pd_dtype + ) @property def is_bool(self) -> bool: @@ -794,7 +796,9 @@ def metric_source_fields( pd_dtypes.append(np.dtype(pd_dtype)) os_field_names.append(os_field_name) os_date_formats.append(os_date_format) - elif include_timestamp and (is_datetime64_any_dtype(pd_dtype) or is_timedelta64_dtype(pd_dtype)): + elif include_timestamp and ( + is_datetime64_any_dtype(pd_dtype) or is_timedelta64_dtype(pd_dtype) + ): pd_dtypes.append(np.dtype(pd_dtype)) os_field_names.append(os_field_name) os_date_formats.append(os_date_format)