mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 08:37:14 -04:00
Address flake8 suggestions
This commit is contained in:
+4
-4
@@ -25,7 +25,7 @@ def entry_list_gen(_directory=f"{home}/.local/share/sshyp/"):
|
|||||||
if _ran:
|
if _ran:
|
||||||
print(f"\n\n\u001b[38;5;7;48;5;8m{_root.replace(f'{home}/.local/share/sshyp', '', 1)}/\u001b[0m")
|
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:
|
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
|
_char_counter = 0
|
||||||
for _filename in sorted(_files):
|
for _filename in sorted(_files):
|
||||||
if _color_alternator > 0:
|
if _color_alternator > 0:
|
||||||
@@ -52,7 +52,7 @@ def entry_reader(_decrypted_entry):
|
|||||||
if pass_show:
|
if pass_show:
|
||||||
_entry_password = f'\u001b[38;5;10m{_decrypted_entry[0]}\u001b[0m'
|
_entry_password = f'\u001b[38;5;10m{_decrypted_entry[0]}\u001b[0m'
|
||||||
else:
|
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()
|
print()
|
||||||
for _num in range(len(_decrypted_entry)):
|
for _num in range(len(_decrypted_entry)):
|
||||||
try:
|
try:
|
||||||
@@ -69,7 +69,7 @@ def entry_reader(_decrypted_entry):
|
|||||||
print('\u001b[38;5;7;48;5;8mnotes:\u001b[0m\n' + _decrypted_entry[_num])
|
print('\u001b[38;5;7;48;5;8mnotes:\u001b[0m\n' + _decrypted_entry[_num])
|
||||||
if _notes_flag == 1:
|
if _notes_flag == 1:
|
||||||
try:
|
try:
|
||||||
_line_test = _decrypted_entry[_num + 1]
|
_ = _decrypted_entry[_num + 1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
print()
|
print()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
@@ -500,7 +500,7 @@ def edit():
|
|||||||
# generates a password for a new or an existing entry
|
# generates a password for a new or an existing entry
|
||||||
def gen():
|
def gen():
|
||||||
# set to avoid PEP8 warnings
|
# set to avoid PEP8 warnings
|
||||||
_username, _url, _notes = None, None, None
|
_username, _url = None, None
|
||||||
# gen update
|
# gen update
|
||||||
if arg_count == 3 and arguments[2] in ('update', '-u'):
|
if arg_count == 3 and arguments[2] in ('update', '-u'):
|
||||||
# ensure the gen update target is an entry
|
# ensure the gen update target is an entry
|
||||||
|
|||||||
+2
-2
@@ -478,8 +478,8 @@ def extension_downloader():
|
|||||||
if _choice == 1:
|
if _choice == 1:
|
||||||
# download extension files to temporary directory
|
# download extension files to temporary directory
|
||||||
_exe_dir, _ini_dir = f"{gettempdir()}/sshyp_exe", f"{gettempdir()}/sshyp_ini"
|
_exe_dir, _ini_dir = f"{gettempdir()}/sshyp_exe", f"{gettempdir()}/sshyp_ini"
|
||||||
_ext_exe = urlretrieve(_pointer.get(_selected, 'exe'), _exe_dir)
|
urlretrieve(_pointer.get(_selected, 'exe'), _exe_dir)
|
||||||
_ext_ini = urlretrieve(_pointer.get(_selected, 'ini'), _ini_dir)
|
urlretrieve(_pointer.get(_selected, 'ini'), _ini_dir)
|
||||||
# set permissions under active user
|
# set permissions under active user
|
||||||
chmod(_exe_dir, 0o755)
|
chmod(_exe_dir, 0o755)
|
||||||
chmod(_ini_dir, 0o644)
|
chmod(_ini_dir, 0o644)
|
||||||
|
|||||||
Reference in New Issue
Block a user