[Xfce4-commits] [apps/catfish] 01/01: Apply autopep8 fixes
noreply at xfce.org
noreply at xfce.org
Wed Jan 1 14:46:50 CET 2020
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/catfish.
commit bd7cd40ecad292154a7d32c223737774b613042a
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Jan 1 08:46:42 2020 -0500
Apply autopep8 fixes
---
catfish/CatfishSearchEngine.py | 14 ++++++++------
catfish/CatfishWindow.py | 9 ++++-----
catfish_lib/catfishconfig.py | 10 +++++-----
setup.py | 3 ++-
4 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/catfish/CatfishSearchEngine.py b/catfish/CatfishSearchEngine.py
index 29ed554..befe63d 100644
--- a/catfish/CatfishSearchEngine.py
+++ b/catfish/CatfishSearchEngine.py
@@ -141,7 +141,7 @@ class CatfishSearchEngine:
"""Add a CatfishSearchMethod the the engine's search backends."""
self.methods.append(method_class())
- def run(self, keywords, path, limit=-1, regex=False): # noqa
+ def run(self, keywords, path, limit=-1, regex=False): # noqa
"""Run the CatfishSearchEngine.
Each method is run sequentially in the order they are added.
@@ -296,7 +296,8 @@ class CatfishSearchMethod_Walk(CatfishSearchMethod):
"""Initialize the 'walk' Search Method."""
CatfishSearchMethod.__init__(self, "walk")
- def get_dir_list(self, root, dirs, xdg_list, exclude_list, processed_links):
+ def get_dir_list(self, root, dirs, xdg_list,
+ exclude_list, processed_links):
dirs = sorted(dirs, key=lambda s: s.lower())
# Prioritize: XDG, Visible (Linked), Dotfile (Linked)
@@ -394,12 +395,13 @@ class CatfishSearchMethod_Walk(CatfishSearchMethod):
processed_links.append(realpath)
# Prioritize and drop excluded paths
- dirs[:] = self.get_dir_list(root, dirs, xdgdirlist, exclude, processed_links)
+ dirs[:] = self.get_dir_list(
+ root, dirs, xdgdirlist, exclude, processed_links)
- paths = dirs + files
- paths.sort()
+ paths = sorted(dirs + files)
- # Check paths in the second and deeper levels of the selected directory
+ # Check paths in the second and deeper levels of the selected
+ # directory
for path in paths:
if any(keyword in path.lower() for keyword in keywords):
yield os.path.join(root, path)
diff --git a/catfish/CatfishWindow.py b/catfish/CatfishWindow.py
index 1351366..099e439 100644
--- a/catfish/CatfishWindow.py
+++ b/catfish/CatfishWindow.py
@@ -741,7 +741,7 @@ class CatfishWindow(Window):
self.update_index_infobar.show()
- def on_update_index_unlock_clicked(self, widget): # noqa
+ def on_update_index_unlock_clicked(self, widget): # noqa
"""Unlock admin rights and perform 'updatedb' query."""
self.update_index_active = True
@@ -1224,8 +1224,7 @@ class CatfishWindow(Window):
"""Show a delete dialog and remove the file if accepted."""
filenames = []
if self.get_delete_dialog(self.selected_filenames):
- delete = self.selected_filenames
- delete.sort()
+ delete = sorted(self.selected_filenames)
delete.reverse()
for filename in delete:
if self.delete_file(filename):
@@ -1558,7 +1557,7 @@ class CatfishWindow(Window):
time.localtime(modification_int))
return modified
- def results_filter_func(self, model, iter, user_data): # noqa
+ def results_filter_func(self, model, iter, user_data): # noqa
"""Filter function for search results."""
# hidden
if model[iter][6]:
@@ -1751,7 +1750,7 @@ class CatfishWindow(Window):
return 1
# -- Searching -- #
- def perform_query(self, keywords): # noqa
+ def perform_query(self, keywords): # noqa
"""Run the search query with the specified keywords."""
self.stop_search = False
diff --git a/catfish_lib/catfishconfig.py b/catfish_lib/catfishconfig.py
index e7652c7..9821703 100644
--- a/catfish_lib/catfishconfig.py
+++ b/catfish_lib/catfishconfig.py
@@ -90,8 +90,8 @@ def get_about():
'website': __url__,
'comments': _('Catfish is a versatile file searching tool.'),
'copyright': 'Copyright (C) 2007-2012 Christian Dywan <christian at twotoasts.de>\n'
- 'Copyright (C) 2012-2019 Sean Davis <bluesabre at xfce.org>',
- 'authors': ['Christian Dywan <christian at twotoasts.de>',
- 'Sean Davis <bluesabre at xfce.org>'],
- 'artists': ['Nancy Runge <nancy at twotoasts.de>']
- }
\ No newline at end of file
+ 'Copyright (C) 2012-2019 Sean Davis <bluesabre at xfce.org>',
+ 'authors': [
+ 'Christian Dywan <christian at twotoasts.de>',
+ 'Sean Davis <bluesabre at xfce.org>'],
+ 'artists': ['Nancy Runge <nancy at twotoasts.de>']}
diff --git a/setup.py b/setup.py
index fce5f53..af9b6a6 100644
--- a/setup.py
+++ b/setup.py
@@ -196,6 +196,7 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto):
cleanup_metainfo_files(self.root, target_data)
os.remove(metainfo)
+
# Verify the build directory is clean
folder = "dist/catfish-%s" % __version__
if os.path.exists(folder):
@@ -266,4 +267,4 @@ if default_release_build:
print("%s%s/" % (indent, basedir))
indent += " "
for filename in contents[basedir]:
- print(indent + filename)
\ No newline at end of file
+ print(indent + filename)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list