From 6f9697a3de64110e42a732495e7e260e196433ea Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Thu, 27 Jan 2022 00:25:21 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- console.py | 14 +------------- gui.py | 3 +-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/console.py b/console.py index f0f07cb..42585cf 100644 --- a/console.py +++ b/console.py @@ -25,21 +25,9 @@ action = '' while action not in ['-', '+', 'e', 'd']: - action = input('Encrypter (+|e) ou Décrypter (-|d) ? ') -else: - - if action in ['-', 'd']: - - code = decrypt(word, step) - - else: - - code = encrypt(word, step) - - - +code = decrypt(word, step) if action in ['-', 'd'] else encrypt(word, step) print('Le mot crypté est :', code) print('-------------------------------------------------') input("===Tapez sur n'importe quel touche pour sortir===") \ No newline at end of file diff --git a/gui.py b/gui.py index 0857482..805871d 100644 --- a/gui.py +++ b/gui.py @@ -39,8 +39,7 @@ def loop(self): def addForm(self, **kw): """Create a new form""" - form = Form(self, **kw) - return form + return Form(self, **kw) class Form(Frame):