From 2999d063dbc51d1c5932b8cd3248cfadaad7449a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 14 Aug 2018 13:48:53 +0200 Subject: [PATCH] Default global state variables to the correct type Code gets easier to understand if variables don't change their type. --- benchmark/space/global_state.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/benchmark/space/global_state.py b/benchmark/space/global_state.py index 5ad8289..c8bf91f 100644 --- a/benchmark/space/global_state.py +++ b/benchmark/space/global_state.py @@ -3,16 +3,16 @@ import threading class G: """Global state of the Benchmark Client.""" - result_platform = None - progress_status = None - result_stats = None - result_dict = None + result_platform = '' + progress_status = '' + result_stats = '' + result_dict = {} background_image_path = "" scene_status = {} cancel = False - cached_system_info = None - cached_compute_devices = None + cached_system_info = {} + cached_compute_devices = [] results_submitted = False images = {} @@ -22,10 +22,10 @@ class G: @classmethod def reset(cls): """Reset the global state.""" - cls.result_platform = None - cls.progress_status = None - cls.result_stats = None - cls.result_dict = None + cls.result_platform = '' + cls.progress_status = '' + cls.result_stats = '' + cls.result_dict = {} cls.background_image_path = "" cls.scene_status = {} cls.results_submitted = False