From 1935641a96ac3c2e45c84a68d81a30e7144d3741 Mon Sep 17 00:00:00 2001 From: Sourcery AI Date: Fri, 17 Sep 2021 03:51:23 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- CSV_JSON_converter/csv_json_conv.py | 3 +-- password_gen/pass_gen.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CSV_JSON_converter/csv_json_conv.py b/CSV_JSON_converter/csv_json_conv.py index d3d8bc8..802472f 100644 --- a/CSV_JSON_converter/csv_json_conv.py +++ b/CSV_JSON_converter/csv_json_conv.py @@ -40,5 +40,4 @@ def csv2json(self): pass -if __name__ == '__main__': - pass \ No newline at end of file +pass \ No newline at end of file diff --git a/password_gen/pass_gen.py b/password_gen/pass_gen.py index 86d40ca..bc7a753 100644 --- a/password_gen/pass_gen.py +++ b/password_gen/pass_gen.py @@ -40,9 +40,9 @@ def _take_bool_input(self, prompt_txt): val = input(prompt_txt + " (y/n): ") # Try to parse user input - if (val == 'y') or (val == 'Y'): + if val in ['y', 'Y']: return True - elif (val == 'n') or (val == 'N'): + elif val in ['n', 'N']: return False else: return None @@ -122,7 +122,7 @@ def generate(self, count=1): CHAR_RANGES[chosen_set][0], CHAR_RANGES[chosen_set][1], )) - curr_pass = curr_pass + newchar + curr_pass += newchar passwords_out.append(curr_pass) count -= 1