Skip to content

Commit

Permalink
removed return type on utils func definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Deigoodle committed Feb 13, 2024
1 parent b48b7fe commit 014226e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
5 changes: 1 addition & 4 deletions glucopy/utils/disjoin_days_and_hours.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion glucopy/utils/mgdl_to_mmol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion glucopy/utils/mmol_to_mgdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 1 addition & 4 deletions glucopy/utils/str_to_time.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion glucopy/utils/time_factor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def time_factor(t: str) -> int:
def time_factor(t: str):
'''
Return the time factor of a given time string.
Expand Down
2 changes: 1 addition & 1 deletion glucopy/utils/time_to_str.py
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 014226e

Please sign in to comment.