Slight Pep8 fixes, import cleanup

This commit is contained in:
itdominator 2022-02-20 00:28:34 -06:00
parent 7b4bbd7c2b
commit 312a782a87
10 changed files with 12 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
.idea/
*.zip
# ---> Python
# Byte-compiled / optimized / DLL files

View File

@ -127,7 +127,7 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi
gc.collect()
def do_action_from_menu_controls(self, widget, eventbutton):
def do_action_from_menu_controls(self, widget, event_button):
action = widget.get_name()
self.hide_context_menu()
self.hide_new_file_menu()

View File

@ -48,7 +48,7 @@ class IPCServerMixin:
conn.close()
break
# NOTE: Not perfect but insures we don't lockup the connection for too long.
# NOTE: Not perfect but insures we don't lock up the connection for too long.
end_time = time.time()
if (end - start) > self.ipc_timeout:
conn.close()

View File

@ -18,9 +18,9 @@ def threaded(fn):
class ExceptionHookMixin:
''' ExceptionHookMixin custom exception hook to reroute to a Gtk text area. '''
def custom_except_hook(self, exctype, value, _traceback):
def custom_except_hook(self, exec_type, value, _traceback):
trace = ''.join(traceback.format_tb(_traceback))
data = f"Exectype: {exctype} <--> Value: {value}\n\n{trace}\n\n\n\n"
data = f"Exec Type: {exec_type} <--> Value: {value}\n\n{trace}\n\n\n\n"
start_itr = self.message_buffer.get_start_iter()
self.message_buffer.place_cursor(start_itr)
self.display_message(self.error, data)
@ -58,5 +58,5 @@ class ExceptionHookMixin:
def set_arc_buffer_text(self, widget=None, eve=None):
id = widget.get_active_id()
self.arc_command_buffer.set_text(self.arc_commands[int(id)])
sid = widget.get_active_id()
self.arc_command_buffer.set_text(self.arc_commands[int(sid)])

View File

@ -79,8 +79,8 @@ class WindowMixin(TabMixin):
def set_bottom_labels(self, view):
_wid, _tid, _view, iconview, store = self.get_current_state()
selected_files = iconview.get_selected_items()
_wid, _tid, _view, icon_view, store = self.get_current_state()
selected_files = icon_view.get_selected_items()
current_directory = view.get_current_directory()
path_file = Gio.File.new_for_path(current_directory)
mount_file = path_file.query_filesystem_info(attributes="filesystem::*", cancellable=None)

View File

@ -1,5 +1,5 @@
# Python imports
import threading, subprocess, time, json
import threading, json
from os import path
# Lib imports

View File

@ -3,9 +3,6 @@ import os, subprocess, hashlib
from os.path import isfile
# Gtk imports
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
# Application imports
from .xdg.DesktopEntry import DesktopEntry

View File

@ -1,5 +1,5 @@
# Python imports
import os, shutil, subprocess, threading
import os, shutil
# Lib imports

View File

@ -1,5 +1,5 @@
# Python imports
import os, hashlib, re
import hashlib, re
from os import listdir
from os.path import isdir, isfile, join