commit:     18207cd64bf05ac986bb7f00ec2f3cae95b3ba81
Author:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Thu Jan 22 08:09:34 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 22 19:06:28 2026 +0000
URL:        https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=18207cd6

eclean: black formatting fixes

Signed-off-by: Brian Dolbec <brian.dolbec <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoolkit/pull/60
Signed-off-by: Sam James <sam <AT> gentoo.org>

 pym/gentoolkit/eclean/clean.py            |  8 +++++---
 pym/gentoolkit/eclean/exclude.py          |  1 -
 pym/gentoolkit/eclean/output.py           |  6 +++++-
 pym/gentoolkit/eclean/search.py           | 18 +++++++++++-------
 pym/gentoolkit/test/eclean/distsupport.py |  1 -
 5 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/pym/gentoolkit/eclean/clean.py b/pym/gentoolkit/eclean/clean.py
index 18f90ef..4dd2109 100644
--- a/pym/gentoolkit/eclean/clean.py
+++ b/pym/gentoolkit/eclean/clean.py
@@ -97,8 +97,10 @@ class CleanUp:
             for location, loc_clean_dict in clean_dict.items():
                 print(" * Location", pp.path(location))
                 for key in sorted(loc_clean_dict):
-                    (binpkg, debugpack) = loc_clean_dict[key]
-                    key_size = self._get_size([binpkg, debugpack] if debugpack 
else [binpkg])
+                    binpkg, debugpack = loc_clean_dict[key]
+                    key_size = self._get_size(
+                        [binpkg, debugpack] if debugpack else [binpkg]
+                    )
                     self.controller(key_size, key, loc_clean_dict[key], 
file_type)
                     clean_size += key_size
 
@@ -155,7 +157,7 @@ class CleanUp:
         rm_files = []
         rm_size = 0
 
-        if (sz := self._get_size_valid_symlink(files[0])):
+        if sz := self._get_size_valid_symlink(files[0]):
             rm_files.append(files[0])
             rm_size += sz
 

diff --git a/pym/gentoolkit/eclean/exclude.py b/pym/gentoolkit/eclean/exclude.py
index c20574c..e569e56 100644
--- a/pym/gentoolkit/eclean/exclude.py
+++ b/pym/gentoolkit/eclean/exclude.py
@@ -9,7 +9,6 @@ import re
 import portage
 from portage import _encodings, _unicode_encode
 
-
 # Misc. shortcuts to some portage stuff:
 listdir = portage.listdir
 

diff --git a/pym/gentoolkit/eclean/output.py b/pym/gentoolkit/eclean/output.py
index b512c8b..500a0a3 100644
--- a/pym/gentoolkit/eclean/output.py
+++ b/pym/gentoolkit/eclean/output.py
@@ -136,7 +136,11 @@ class OutputControl:
         if not self.options["quiet"]:
             # pretty print mode
             if file_type == "binary package" and clean_list[1] is not None:
-                print(self.prettySize(size, True), self.pkg_color(key), "(+ 
debug tarball)")
+                print(
+                    self.prettySize(size, True),
+                    self.pkg_color(key),
+                    "(+ debug tarball)",
+                )
             else:
                 print(self.prettySize(size, True), self.pkg_color(key))
         elif self.options["pretend"] or self.options["interactive"]:

diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
index 1dc8722..b177833 100644
--- a/pym/gentoolkit/eclean/search.py
+++ b/pym/gentoolkit/eclean/search.py
@@ -392,16 +392,14 @@ class DistfilesSearch:
         for cpv in cpvs:
             # get SRC_URI and RESTRICT from aux_get
             try:  # main portdb
-                (src_uri, restrict) = self.portdb.aux_get(cpv, ["SRC_URI", 
"RESTRICT"])
+                src_uri, restrict = self.portdb.aux_get(cpv, ["SRC_URI", 
"RESTRICT"])
                 # keep fetch-restricted check
                 # inside try so it is bypassed on KeyError
                 if "fetch" in restrict:
                     pkgs[cpv] = src_uri
             except KeyError:
                 try:  # installed vardb
-                    (src_uri, restrict) = self.vardb.aux_get(
-                        cpv, ["SRC_URI", "RESTRICT"]
-                    )
+                    src_uri, restrict = self.vardb.aux_get(cpv, ["SRC_URI", 
"RESTRICT"])
                     deprecated[cpv] = src_uri
                     self.output(DEPRECATED % cpv)
                     # keep fetch-restricted check
@@ -680,7 +678,7 @@ def findPackages(
 
     # Load binrepos.conf if possible, get all cache locations
     binrepos_conf_path = os.path.join(
-        settings['PORTAGE_CONFIGROOT'], portage.const.BINREPOS_CONF_FILE
+        settings["PORTAGE_CONFIGROOT"], portage.const.BINREPOS_CONF_FILE
     )
     binrepos_conf = BinRepoConfigLoader((binrepos_conf_path,), settings)
     locations = {pkgdir}
@@ -728,7 +726,10 @@ def findPackages(
                     binpkg_key = mk_binpkg_key(drop_cpv)
                     binpkg_path = bin_dbapi.bintree.getname(drop_cpv)
                     debuginfo_path = _find_debuginfo_tarball(drop_cpv, cp)
-                    dead_binpkgs.setdefault(location, {})[binpkg_key] = 
(binpkg_path, debuginfo_path)
+                    dead_binpkgs.setdefault(location, {})[binpkg_key] = (
+                        binpkg_path,
+                        debuginfo_path,
+                    )
 
                     if new_time < old_time:
                         continue
@@ -773,7 +774,10 @@ def findPackages(
 
             binpkg_path = bin_dbapi.bintree.getname(cpv)
             debuginfo_path = _find_debuginfo_tarball(cpv, cp)
-            dead_binpkgs.setdefault(location, {})[binpkg_key] = (binpkg_path, 
debuginfo_path)
+            dead_binpkgs.setdefault(location, {})[binpkg_key] = (
+                binpkg_path,
+                debuginfo_path,
+            )
 
         try:
             invalid_paths[location] = bin_dbapi.bintree.invalid_paths

diff --git a/pym/gentoolkit/test/eclean/distsupport.py 
b/pym/gentoolkit/test/eclean/distsupport.py
index 9ea0c8d..0d9c3a6 100644
--- a/pym/gentoolkit/test/eclean/distsupport.py
+++ b/pym/gentoolkit/test/eclean/distsupport.py
@@ -10,7 +10,6 @@ from tempfile import mkdtemp
 import subprocess
 import portage
 
-
 dir_mode = 0o774
 
 CPVS = [

Reply via email to