Gentoo Archives: gentoo-portage-dev

From: Aaron Bauman <bman@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Aaron Bauman <bman@g.o>
Subject: [gentoo-portage-dev] [PATCH 3/4] lib/_emerge/search.py: fix reimported
Date: Tue, 04 Aug 2020 02:45:12
Message-Id: 20200804024458.2228759-3-bman@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 1/4] pylintrc: turn on checks for reimported modules by Aaron Bauman
1 * The bold module is imported twice. Once as 'bold' and again as 'white.
2 Remove the duplication and fix the one reference to 'white'
3
4 Signed-off-by: Aaron Bauman <bman@g.o>
5 ---
6 lib/_emerge/search.py | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
8
9 diff --git a/lib/_emerge/search.py b/lib/_emerge/search.py
10 index a4ad74311..a59191c1a 100644
11 --- a/lib/_emerge/search.py
12 +++ b/lib/_emerge/search.py
13 @@ -9,7 +9,7 @@ from portage.dbapi.porttree import _parse_uri_map
14 from portage.dbapi.IndexedPortdb import IndexedPortdb
15 from portage.dbapi.IndexedVardb import IndexedVardb
16 from portage.localization import localized_size
17 -from portage.output import bold, bold as white, darkgreen, green, red
18 +from portage.output import bold, darkgreen, green, red
19 from portage.util import writemsg_stdout
20 from portage.util.iterators.MultiIterGroupBy import MultiIterGroupBy
21
22 @@ -413,7 +413,7 @@ class search:
23
24 if masked:
25 msg.append(green("*") + " " + \
26 - white(match) + " " + red("[ Masked ]") + "\n")
27 + bold(match) + " " + red("[ Masked ]") + "\n")
28 else:
29 msg.append(green("*") + " " + bold(match) + "\n")
30 myversion = self.getVersion(full_package, search.VERSION_RELEASE)
31 --
32 2.28.0