From 014226e42ba1487d132e543025309408f00a8a92 Mon Sep 17 00:00:00 2001 From: Deigoodle Date: Tue, 13 Feb 2024 12:03:54 -0300 Subject: [PATCH] removed return type on utils func definitions --- glucopy/utils/disjoin_days_and_hours.py | 5 +---- glucopy/utils/mgdl_to_mmol.py | 2 +- glucopy/utils/mmol_to_mgdl.py | 2 +- glucopy/utils/str_to_time.py | 5 +---- glucopy/utils/time_factor.py | 2 +- glucopy/utils/time_to_str.py | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/glucopy/utils/disjoin_days_and_hours.py b/glucopy/utils/disjoin_days_and_hours.py index 7c93842..4ebb7b6 100644 --- a/glucopy/utils/disjoin_days_and_hours.py +++ b/glucopy/utils/disjoin_days_and_hours.py @@ -1,13 +1,10 @@ -# Built-in -import datetime - # 3rd party import pandas as pd def disjoin_days_and_hours(df, date_column: str | int = 0, cgm_column: str | int = 1, - date_format: str | None = None) -> pd.DataFrame: + date_format: str | None = None): ''' Disjoins a dataframe with a column with datetime objects into a dataframe with columns for day, time and cgm values diff --git a/glucopy/utils/mgdl_to_mmol.py b/glucopy/utils/mgdl_to_mmol.py index 74879c9..0cff48c 100644 --- a/glucopy/utils/mgdl_to_mmol.py +++ b/glucopy/utils/mgdl_to_mmol.py @@ -3,7 +3,7 @@ FACTOR = 18.0 -def mgdl_to_mmoll(mgdl: float | int | np.ndarray) -> float | int | np.ndarray: +def mgdl_to_mmoll(mgdl: float | int | np.ndarray): ''' Convert mg/dL to mmol/L. diff --git a/glucopy/utils/mmol_to_mgdl.py b/glucopy/utils/mmol_to_mgdl.py index b335b5f..fbe7408 100644 --- a/glucopy/utils/mmol_to_mgdl.py +++ b/glucopy/utils/mmol_to_mgdl.py @@ -3,7 +3,7 @@ FACTOR = 18.0 -def mmoll_to_mgdl(mmoll: float | int | np.ndarray) -> float | int | np.ndarray: +def mmoll_to_mgdl(mmoll: float | int | np.ndarray): ''' Convert mmol/L to mg/dL. diff --git a/glucopy/utils/str_to_time.py b/glucopy/utils/str_to_time.py index a0589da..d425749 100644 --- a/glucopy/utils/str_to_time.py +++ b/glucopy/utils/str_to_time.py @@ -1,10 +1,7 @@ -# Built-in -import datetime - # 3rd party import pandas as pd -def str_to_time(time_string:str) -> datetime.time: +def str_to_time(time_string:str): ''' Converts a string with format 'hh:mm:ss, hh:mm or hh' to a datetime.time object diff --git a/glucopy/utils/time_factor.py b/glucopy/utils/time_factor.py index fb9b207..2808ee6 100644 --- a/glucopy/utils/time_factor.py +++ b/glucopy/utils/time_factor.py @@ -1,4 +1,4 @@ -def time_factor(t: str) -> int: +def time_factor(t: str): ''' Return the time factor of a given time string. diff --git a/glucopy/utils/time_to_str.py b/glucopy/utils/time_to_str.py index 5fcf18f..2c6064c 100644 --- a/glucopy/utils/time_to_str.py +++ b/glucopy/utils/time_to_str.py @@ -1,7 +1,7 @@ # Built-in import datetime -def time_to_str(time:datetime.time) -> str: +def time_to_str(time:datetime.time): ''' Converts a datetime.time object to a string with format 'hh:mm:ss'