Commit f9aa9e2f authored by Millian Poquet's avatar Millian Poquet
Browse files

[tools] exec*: codacy fixes

parent c631d1a1
......@@ -24,6 +24,14 @@ from execute_one_instance import execute_command_inner
from execute_one_instance import random_string, put_variables_in_file
# Ugly globals
hash_length = 8
sweeper = None
instance_id_to_instance_number = dict()
instances_df = None
instances_df_filename = None
class hashabledict(dict):
"""A homemade hashable dictionary."""
......@@ -662,10 +670,7 @@ def execute_instances(base_working_directory,
sweeper.get_skipped() | sweeper.get_inprogress()
global instance_id_to_instance_number
instance_id_to_instance_number = dict()
global hash_length
hash_length = 8
rows_list = []
instance_number = 0
for comb in all_combs:
......@@ -966,7 +971,7 @@ can be found in the instances_examples subdirectory.
# Let's read the YAML file content to get the real parameters
desc_file = open(args.instances_description_filename, 'r')
desc_data = yaml.load(desc_file)
desc_data = yaml.safe_load(desc_file)
base_working_directory = os.getcwd()
base_output_directory = os.getcwd()
......
......@@ -141,7 +141,7 @@ def random_string(length=16):
raise Exception('Bad length. Expected 1 or more.')
alphanum = "abcdefghijklmnopqrstuvwxyz0123456789"
s = ''
for i in range(length):
for _ in range(length):
s += random.choice(alphanum)
return s
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment