From b9b4b1efb892fe2f676d86610a5efcf9167a2963 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 18 Dec 2021 22:38:31 +0330 Subject: [PATCH] fix : autopep8 #79 --- samila/functions.py | 12 +++++++----- samila/genimage.py | 3 ++- samila/params.py | 26 +++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/samila/functions.py b/samila/functions.py index 501e402..c779c9b 100644 --- a/samila/functions.py +++ b/samila/functions.py @@ -11,20 +11,22 @@ from .params import FIG_SAVE_SUCCESS_MESSAGE, NFT_STORAGE_SUCCESS_MESSAGE, DATA_ from .params import ELEMENTS_LIST, ARGUMENTS_LIST, OPERATORS_LIST from .errors import samilaDataError + def random_equation_gen(): """ Generate random equation. :return: equation as str """ - num_elements = random.randint(2,len(ELEMENTS_LIST) + 3) + num_elements = random.randint(2, len(ELEMENTS_LIST) + 3) result = "" index = 1 random_coef = "random.uniform(-1,1)" - while(index<=num_elements): + while(index <= num_elements): argument = random.choice(ARGUMENTS_LIST) - result = result + random.choice(ELEMENTS_LIST).format(random_coef,argument) - if index