clean up
This commit is contained in:
+1
-2
@@ -1,7 +1,7 @@
|
||||
import yaml, os, random
|
||||
module_root_directory = os.path.dirname(os.path.realpath(__file__))
|
||||
config_file = os.path.join(module_root_directory,'sizes.yaml')
|
||||
|
||||
# TODO: make inputs?
|
||||
def read_config(item):
|
||||
with open(config_file, 'r') as file:
|
||||
return yaml.safe_load(file)[item]
|
||||
@@ -18,7 +18,6 @@ class RandomSize:
|
||||
FUNCTION = "func"
|
||||
def func(self:str,seed):
|
||||
sizes = read_config('sizes')
|
||||
print(sizes)
|
||||
rand_obj = random.Random(seed)
|
||||
size = rand_obj.choice(sizes)
|
||||
x, y = [int(v) for v in size.split('x')]
|
||||
|
||||
Reference in New Issue
Block a user