1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

update type hints with mypy help

This commit is contained in:
Kelly Brazil
2022-01-26 20:40:03 -08:00
parent f19c9c71bf
commit 2adec2c003
4 changed files with 21 additions and 19 deletions

View File

@ -127,7 +127,7 @@ def has_data(data: str) -> bool:
return bool(data and not data.isspace())
def convert_to_int(value: Union[str, float]) -> int:
def convert_to_int(value: Union[str, float]) -> Union[int, None]:
"""
Converts string and float input to int. Strips all non-numeric
characters from strings.
@ -157,7 +157,7 @@ def convert_to_int(value: Union[str, float]) -> int:
return None
def convert_to_float(value: Union[str, int]) -> float:
def convert_to_float(value: Union[str, int]) -> Union[float, None]:
"""
Converts string and int input to float. Strips all non-numeric
characters from strings.