summaryrefslogtreecommitdiff
path: root/src/backend/search.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-11 05:32:19 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-11 05:32:19 +0000
commita9d87ee5bd0c98b6daae9ddf307c634da9c35551 (patch)
tree3ae25a65b1511d7a9368fa21b4779a6880a132b7 /src/backend/search.py
parent4edf9a7f554f183ccc34b0e57e734a2cbd6f5b9d (diff)
run autopep8 on the code
Diffstat (limited to 'src/backend/search.py')
-rw-r--r--src/backend/search.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/search.py b/src/backend/search.py
index 564bd38..ab6ffa2 100644
--- a/src/backend/search.py
+++ b/src/backend/search.py
@@ -8,7 +8,7 @@ import sisyphus.getfs
import sisyphus.update
-def searchDB(filter, cat='', pn='', desc=''):
+def srch_db(filter, cat='', pn='', desc=''):
NOVIRT = "AND cat NOT LIKE 'virtual'"
SELECTS = {
'all': f'''SELECT
@@ -106,18 +106,18 @@ def tosql(string):
return '%%' if string == '' else string.replace('*', '%').replace('?', '_')
-def showSearch(filter, cat, pn, desc, single):
+def srch_rslt(filter, cat, pn, desc, single):
print("Searching" + sisyphus.getcolor.bright_yellow + " " +
f"{filter}" + " " + sisyphus.getcolor.reset + "packages ..." + "\n")
- pkglist = searchDB(filter, tosql(cat), tosql(pn), tosql(desc))
+ pkglist = srch_db(filter, tosql(cat), tosql(pn), tosql(desc))
if len(pkglist) == 0:
print(sisyphus.getcolor.bright_red +
"No binary package found!\n" + sisyphus.getcolor.reset)
print(sisyphus.getcolor.bright_yellow + "Use the" + sisyphus.getcolor.reset + " " + "'" + "--ebuild" +
"'" + " " + sisyphus.getcolor.bright_yellow + "option to search source packages" + sisyphus.getcolor.reset)
- print(sisyphus.getcolor.bright_yellow +
- "Use" + sisyphus.getcolor.reset + " " + "'" + "sisyphus search --help" + "'" + " " + sisyphus.getcolor.bright_yellow + "for help" + sisyphus.getcolor.reset)
+ print(sisyphus.getcolor.bright_yellow + "Use" + sisyphus.getcolor.reset + " " + "'" +
+ "sisyphus search --help" + "'" + " " + sisyphus.getcolor.bright_yellow + "for help" + sisyphus.getcolor.reset)
else:
if single:
print(sisyphus.getcolor.green +
@@ -151,7 +151,7 @@ def start(filter, cat, pn, desc, single):
print(sisyphus.getcolor.bright_red + "\nYou don't have root permissions, cannot update the database!\n" +
sisyphus.getcolor.reset + sisyphus.getcolor.bright_yellow + "\nSearch results may be inaccurate" + sisyphus.getcolor.reset)
- showSearch(filter, cat, pn, desc, single)
+ srch_rslt(filter, cat, pn, desc, single)
def estart(pkgname):