Fix style

This commit is contained in:
avogar 2024-08-06 16:06:59 +00:00
parent 56415028d6
commit d124de847b

View File

@ -1959,15 +1959,17 @@ class TestSuite:
) -> Dict[str, Tuple[int, int]]: ) -> Dict[str, Tuple[int, int]]:
if not line.startswith(comment_sign): if not line.startswith(comment_sign):
return {} return {}
random_settings_limits_str = line[len(comment_sign) :].lstrip() # noqa: ignore E203 random_settings_limits_str = line[len(comment_sign) :].lstrip()
random_settings_limits_prefix = "Random settings limits:" random_settings_limits_prefix = "Random settings limits:"
if not random_settings_limits_str.startswith(random_settings_limits_prefix): if not random_settings_limits_str.startswith(random_settings_limits_prefix):
return {} return {}
random_settings_limits_str = random_settings_limits_str[len(random_settings_limits_prefix) :] # noqa: ignore E203 random_settings_limits_str = random_settings_limits_str[
len(random_settings_limits_prefix) :
]
# limits are specified in a form 'setting1=(min, max); setting2=(min,max); ...' # limits are specified in a form 'setting1=(min, max); setting2=(min,max); ...'
random_settings_limits = {} random_settings_limits = {}
for setting_and_limit in random_settings_limits_str.split(';'): for setting_and_limit in random_settings_limits_str.split(";"):
setting_and_limit = setting_and_limit.split('=') setting_and_limit = setting_and_limit.split("=")
random_settings_limits[setting_and_limit[0].strip()] = make_tuple( random_settings_limits[setting_and_limit[0].strip()] = make_tuple(
setting_and_limit[1] setting_and_limit[1]
) )
@ -2014,7 +2016,12 @@ class TestSuite:
all_random_settings_limits = {} all_random_settings_limits = {}
start_time = datetime.now() start_time = datetime.now()
for test_name in all_tests: for test_name in all_tests:
tags, random_settings_limits = load_tags_and_random_settings_limits_from_file(os.path.join(suite_dir, test_name)) # noqa: ignore E203 (
tags,
random_settings_limits,
) = load_tags_and_random_settings_limits_from_file(
os.path.join(suite_dir, test_name)
) # noqa: ignore E203
if tags: if tags:
all_tags[test_name] = tags all_tags[test_name] = tags
if random_settings_limits: if random_settings_limits:
@ -2061,7 +2068,9 @@ class TestSuite:
) )
) )
self.all_tags: Dict[str, Set[str]] = all_tags_and_random_settings_limits[0] self.all_tags: Dict[str, Set[str]] = all_tags_and_random_settings_limits[0]
self.all_random_settings_limits: Dict[str, Dict[str, (int, int)]] = all_tags_and_random_settings_limits[1] # noqa: ignore E203 self.all_random_settings_limits: Dict[
str, Dict[str, (int, int)]
] = all_tags_and_random_settings_limits[1]
self.sequential_tests = [] self.sequential_tests = []
self.parallel_tests = [] self.parallel_tests = []