Default global state variables to the correct type

Code gets easier to understand if variables don't change their type.
This commit is contained in:
2018-08-14 13:48:53 +02:00
parent 088427a833
commit 2999d063db

View File

@@ -3,16 +3,16 @@ import threading
class G: class G:
"""Global state of the Benchmark Client.""" """Global state of the Benchmark Client."""
result_platform = None result_platform = ''
progress_status = None progress_status = ''
result_stats = None result_stats = ''
result_dict = None result_dict = {}
background_image_path = "" background_image_path = ""
scene_status = {} scene_status = {}
cancel = False cancel = False
cached_system_info = None cached_system_info = {}
cached_compute_devices = None cached_compute_devices = []
results_submitted = False results_submitted = False
images = {} images = {}
@@ -22,10 +22,10 @@ class G:
@classmethod @classmethod
def reset(cls): def reset(cls):
"""Reset the global state.""" """Reset the global state."""
cls.result_platform = None cls.result_platform = ''
cls.progress_status = None cls.progress_status = ''
cls.result_stats = None cls.result_stats = ''
cls.result_dict = None cls.result_dict = {}
cls.background_image_path = "" cls.background_image_path = ""
cls.scene_status = {} cls.scene_status = {}
cls.results_submitted = False cls.results_submitted = False