From 249269a3e35d33e41ecf0adf00d448517381048c Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 8 Jan 2024 19:39:44 -0500 Subject: [PATCH] Address flake8 suggestions --- lib/sshyp.py | 8 ++++---- lib/stweak.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index b46096e..b86eb95 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -25,7 +25,7 @@ def entry_list_gen(_directory=f"{home}/.local/share/sshyp/"): if _ran: print(f"\n\n\u001b[38;5;7;48;5;8m{_root.replace(f'{home}/.local/share/sshyp', '', 1)}/\u001b[0m") elif _root == f"{home}/.local/share/sshyp/" and len(_files) > 0: - print(f"\n\n\u001b[38;5;7;48;5;8m/\u001b[0m") + print("\n\n\u001b[38;5;7;48;5;8m/\u001b[0m") _char_counter = 0 for _filename in sorted(_files): if _color_alternator > 0: @@ -52,7 +52,7 @@ def entry_reader(_decrypted_entry): if pass_show: _entry_password = f'\u001b[38;5;10m{_decrypted_entry[0]}\u001b[0m' else: - _entry_password = f'\u001b[38;5;3mend command in "--show" or "-s" to view\u001b[0m' + _entry_password = '\u001b[38;5;3mend command in "--show" or "-s" to view\u001b[0m' print() for _num in range(len(_decrypted_entry)): try: @@ -69,7 +69,7 @@ def entry_reader(_decrypted_entry): print('\u001b[38;5;7;48;5;8mnotes:\u001b[0m\n' + _decrypted_entry[_num]) if _notes_flag == 1: try: - _line_test = _decrypted_entry[_num + 1] + _ = _decrypted_entry[_num + 1] except IndexError: print() except IndexError: @@ -500,7 +500,7 @@ def edit(): # generates a password for a new or an existing entry def gen(): # set to avoid PEP8 warnings - _username, _url, _notes = None, None, None + _username, _url = None, None # gen update if arg_count == 3 and arguments[2] in ('update', '-u'): # ensure the gen update target is an entry diff --git a/lib/stweak.py b/lib/stweak.py index d599fb4..baf9671 100644 --- a/lib/stweak.py +++ b/lib/stweak.py @@ -478,8 +478,8 @@ def extension_downloader(): if _choice == 1: # download extension files to temporary directory _exe_dir, _ini_dir = f"{gettempdir()}/sshyp_exe", f"{gettempdir()}/sshyp_ini" - _ext_exe = urlretrieve(_pointer.get(_selected, 'exe'), _exe_dir) - _ext_ini = urlretrieve(_pointer.get(_selected, 'ini'), _ini_dir) + urlretrieve(_pointer.get(_selected, 'exe'), _exe_dir) + urlretrieve(_pointer.get(_selected, 'ini'), _ini_dir) # set permissions under active user chmod(_exe_dir, 0o755) chmod(_ini_dir, 0o644)