From af51fda54b6e72cf870e03cf4402c27b8fae3409 Mon Sep 17 00:00:00 2001 From: Alexey Kulikov Date: Sun, 10 Sep 2023 14:31:44 +0100 Subject: [PATCH] type comparisons have failed for some reason --- src/sheets/sheets_objects.py | 2 +- src/tg/handlers/access_config_handler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sheets/sheets_objects.py b/src/sheets/sheets_objects.py index 69ff0a4..fcb3241 100644 --- a/src/sheets/sheets_objects.py +++ b/src/sheets/sheets_objects.py @@ -188,7 +188,7 @@ def __getattr__(self, name): # Excel time format, http://www.cpearson.com/excel/datetime.htm # 40000 is around 2009 # 50000 is around 2040, ph I hope Sysblok will thrive in 2040 - if type(value) == float and 40000 <= value <= 50000: + if type(value) is float and 40000 <= value <= 50000: return convert_excel_datetime_to_string(value) else: return value diff --git a/src/tg/handlers/access_config_handler.py b/src/tg/handlers/access_config_handler.py index 7618920..1b3a339 100644 --- a/src/tg/handlers/access_config_handler.py +++ b/src/tg/handlers/access_config_handler.py @@ -164,7 +164,7 @@ def _set_config(update, config_path: str, new_value, config_manager: ConfigManag update, ) return - if type(current_config) != type(new_value): + if type(current_config) is not type(new_value): reply( load( "access_config_handler__set_config_type_mismatch",