1 |
* Python implies such things. Let's drop 'em and be consistent. |
2 |
|
3 |
Signed-off-by: Aaron Bauman <bman@g.o> |
4 |
--- |
5 |
lib/_emerge/EbuildPhase.py | 6 +++--- |
6 |
lib/_emerge/resolver/output.py | 5 +++++ |
7 |
lib/portage/elog/mod_custom.py | 1 + |
8 |
lib/portage/elog/mod_echo.py | 4 ++-- |
9 |
lib/portage/elog/mod_mail.py | 2 ++ |
10 |
lib/portage/glsa.py | 3 +++ |
11 |
lib/portage/mail.py | 1 + |
12 |
lib/portage/sync/controller.py | 3 ++- |
13 |
lib/portage/util/whirlpool.py | 2 ++ |
14 |
pylintrc | 1 - |
15 |
10 files changed, 21 insertions(+), 7 deletions(-) |
16 |
|
17 |
diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py |
18 |
index ceffeccee..e6256d0aa 100644 |
19 |
--- a/lib/_emerge/EbuildPhase.py |
20 |
+++ b/lib/_emerge/EbuildPhase.py |
21 |
@@ -9,12 +9,11 @@ import tempfile |
22 |
|
23 |
from _emerge.AsynchronousLock import AsynchronousLock |
24 |
from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor |
25 |
-from _emerge.CompositeTask import CompositeTask |
26 |
-from _emerge.EbuildProcess import EbuildProcess |
27 |
from _emerge.MiscFunctionsProcess import MiscFunctionsProcess |
28 |
+from _emerge.EbuildProcess import EbuildProcess |
29 |
+from _emerge.CompositeTask import CompositeTask |
30 |
from _emerge.PackagePhase import PackagePhase |
31 |
from _emerge.TaskSequence import TaskSequence |
32 |
- |
33 |
from portage.package.ebuild._ipc.QueryCommand import QueryCommand |
34 |
from portage.util._dyn_libs.soname_deps_qa import ( |
35 |
_get_all_provides, |
36 |
@@ -397,6 +396,7 @@ class EbuildPhase(CompositeTask): |
37 |
fd_pipes=self.fd_pipes, phase=phase, scheduler=self.scheduler, |
38 |
settings=self.settings) |
39 |
self._start_task(clean_phase, self._fail_clean_exit) |
40 |
+ return |
41 |
|
42 |
def _fail_clean_exit(self, clean_phase): |
43 |
self._final_exit(clean_phase) |
44 |
diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py |
45 |
index b6c77ecad..1dcb47020 100644 |
46 |
--- a/lib/_emerge/resolver/output.py |
47 |
+++ b/lib/_emerge/resolver/output.py |
48 |
@@ -243,6 +243,7 @@ class Display: |
49 |
cur_use_map[key], old_iuse_map[key], |
50 |
old_use_map[key], is_new, feature_flags, |
51 |
reinst_flags_map.get(key)) |
52 |
+ return |
53 |
|
54 |
|
55 |
@staticmethod |
56 |
@@ -538,6 +539,7 @@ class Display: |
57 |
if show_repos and repoadd: |
58 |
myprint += " " + teal("[%s]" % repoadd) |
59 |
writemsg_stdout("%s\n" % (myprint,), noiselevel=-1) |
60 |
+ return |
61 |
|
62 |
|
63 |
def print_blockers(self): |
64 |
@@ -546,6 +548,7 @@ class Display: |
65 |
""" |
66 |
for pkg in self.blockers: |
67 |
writemsg_stdout("%s\n" % (pkg,), noiselevel=-1) |
68 |
+ return |
69 |
|
70 |
|
71 |
def print_verbose(self, show_repos): |
72 |
@@ -559,6 +562,7 @@ class Display: |
73 |
# that RepoDisplay.__unicode__() is called in python2. |
74 |
writemsg_stdout("%s" % (self.conf.repo_display,), |
75 |
noiselevel=-1) |
76 |
+ return |
77 |
|
78 |
|
79 |
def print_changelog(self): |
80 |
@@ -683,6 +687,7 @@ class Display: |
81 |
if ebuild_path_cl is not None: |
82 |
self.changelogs.extend(_calc_changelog( |
83 |
ebuild_path_cl, pkg_info.previous_pkg, pkg.cpv)) |
84 |
+ return |
85 |
|
86 |
|
87 |
def check_system_world(self, pkg): |
88 |
diff --git a/lib/portage/elog/mod_custom.py b/lib/portage/elog/mod_custom.py |
89 |
index aaf1d3b1b..7cfafeccc 100644 |
90 |
--- a/lib/portage/elog/mod_custom.py |
91 |
+++ b/lib/portage/elog/mod_custom.py |
92 |
@@ -18,3 +18,4 @@ def process(mysettings, key, logentries, fulltext): |
93 |
retval = portage.process.spawn_bash(mylogcmd) |
94 |
if retval != 0: |
95 |
raise portage.exception.PortageException("!!! PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval) |
96 |
+ return |
97 |
diff --git a/lib/portage/elog/mod_echo.py b/lib/portage/elog/mod_echo.py |
98 |
index a026847b7..80f2b11ac 100644 |
99 |
--- a/lib/portage/elog/mod_echo.py |
100 |
+++ b/lib/portage/elog/mod_echo.py |
101 |
@@ -3,10 +3,9 @@ |
102 |
# Distributed under the terms of the GNU General Public License v2 |
103 |
|
104 |
import sys |
105 |
- |
106 |
+from portage.output import EOutput, colorize |
107 |
from portage.const import EBUILD_PHASES |
108 |
from portage.localization import _ |
109 |
-from portage.output import EOutput, colorize |
110 |
|
111 |
|
112 |
_items = [] |
113 |
@@ -62,3 +61,4 @@ def _finalize(): |
114 |
for line in msgcontent: |
115 |
fmap[msgtype](line.strip("\n")) |
116 |
_items = [] |
117 |
+ return |
118 |
diff --git a/lib/portage/elog/mod_mail.py b/lib/portage/elog/mod_mail.py |
119 |
index f737a80ce..38eaa277f 100644 |
120 |
--- a/lib/portage/elog/mod_mail.py |
121 |
+++ b/lib/portage/elog/mod_mail.py |
122 |
@@ -41,3 +41,5 @@ def process(mysettings, key, logentries, fulltext): |
123 |
portage.mail.send_mail(mysettings, mymessage) |
124 |
except PortageException as e: |
125 |
writemsg("%s\n" % str(e), noiselevel=-1) |
126 |
+ |
127 |
+ return |
128 |
diff --git a/lib/portage/glsa.py b/lib/portage/glsa.py |
129 |
index 1870d9338..9260e7e09 100644 |
130 |
--- a/lib/portage/glsa.py |
131 |
+++ b/lib/portage/glsa.py |
132 |
@@ -492,6 +492,7 @@ class Glsa: |
133 |
finally: |
134 |
f.close() |
135 |
|
136 |
+ return None |
137 |
|
138 |
def parse(self, myfile): |
139 |
""" |
140 |
@@ -582,6 +583,7 @@ class Glsa: |
141 |
self.packages[name].append(tmp) |
142 |
# TODO: services aren't really used yet |
143 |
self.services = self.affected.getElementsByTagName("service") |
144 |
+ return None |
145 |
|
146 |
def dump(self, outstream=sys.stdout, encoding="utf-8"): |
147 |
""" |
148 |
@@ -682,6 +684,7 @@ class Glsa: |
149 |
mode='a+', encoding=_encodings['content'], errors='strict') |
150 |
checkfile.write(_unicode_decode(self.nr + "\n")) |
151 |
checkfile.close() |
152 |
+ return None |
153 |
|
154 |
def getMergeList(self, least_change=True): |
155 |
""" |
156 |
diff --git a/lib/portage/mail.py b/lib/portage/mail.py |
157 |
index f4fccd8c2..6503b4cc9 100644 |
158 |
--- a/lib/portage/mail.py |
159 |
+++ b/lib/portage/mail.py |
160 |
@@ -136,3 +136,4 @@ def send_mail(mysettings, message): |
161 |
raise portage.exception.PortageException(_("!!! An error occurred while trying to send logmail:\n")+str(e)) |
162 |
except socket.error as e: |
163 |
raise portage.exception.PortageException(_("!!! A network error occurred while trying to send logmail:\n%s\nSure you configured PORTAGE_ELOG_MAILURI correctly?") % str(e)) |
164 |
+ return |
165 |
diff --git a/lib/portage/sync/controller.py b/lib/portage/sync/controller.py |
166 |
index 24ebf4ff8..cb68e2c37 100644 |
167 |
--- a/lib/portage/sync/controller.py |
168 |
+++ b/lib/portage/sync/controller.py |
169 |
@@ -174,7 +174,7 @@ class SyncManager: |
170 |
|
171 |
|
172 |
def do_callback(self, result): |
173 |
- # print("result:", result, "callback()", self.callback) |
174 |
+ #print("result:", result, "callback()", self.callback) |
175 |
exitcode, updatecache_flg = result |
176 |
self.exitcode = exitcode |
177 |
self.updatecache_flg = updatecache_flg |
178 |
@@ -184,6 +184,7 @@ class SyncManager: |
179 |
writemsg_level(msg + "\n") |
180 |
if self.callback: |
181 |
self.callback(exitcode, updatecache_flg) |
182 |
+ return |
183 |
|
184 |
|
185 |
def perform_post_sync_hook(self, reponame, dosyncuri='', repolocation=''): |
186 |
diff --git a/lib/portage/util/whirlpool.py b/lib/portage/util/whirlpool.py |
187 |
index 857abf3ac..1071d5155 100644 |
188 |
--- a/lib/portage/util/whirlpool.py |
189 |
+++ b/lib/portage/util/whirlpool.py |
190 |
@@ -634,6 +634,7 @@ class WhirlpoolStruct: |
191 |
|
192 |
def WhirlpoolInit(ctx): |
193 |
ctx = WhirlpoolStruct() |
194 |
+ return |
195 |
|
196 |
def WhirlpoolAdd(source, sourceBits, ctx): |
197 |
if not isinstance(source, bytes): |
198 |
@@ -776,6 +777,7 @@ def processBuffer(ctx): |
199 |
# apply the Miyaguchi-Preneel compression function |
200 |
for i in range(8): |
201 |
ctx.hash[i] ^= state[i] ^ block[i] |
202 |
+ return |
203 |
|
204 |
# |
205 |
# Tests. |
206 |
diff --git a/pylintrc b/pylintrc |
207 |
index ce5dec11b..f2aadf14f 100644 |
208 |
--- a/pylintrc |
209 |
+++ b/pylintrc |
210 |
@@ -33,7 +33,6 @@ enable= |
211 |
unused-import, |
212 |
useless-import-alias, |
213 |
useless-object-inheritance, |
214 |
- useless-return, |
215 |
wildcard-import |
216 |
|
217 |
# A comma-separated list of package or module names from where C extensions may |
218 |
-- |
219 |
2.28.0 |