* Python implies such things. Let's drop 'em and be consistent. Signed-off-by: Aaron Bauman <b...@gentoo.org> --- lib/_emerge/EbuildPhase.py | 6 +++--- lib/_emerge/resolver/output.py | 5 +++++ lib/portage/elog/mod_custom.py | 1 + lib/portage/elog/mod_echo.py | 4 ++-- lib/portage/elog/mod_mail.py | 2 ++ lib/portage/glsa.py | 3 +++ lib/portage/mail.py | 1 + lib/portage/sync/controller.py | 3 ++- lib/portage/util/whirlpool.py | 2 ++ pylintrc | 1 - 10 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py index ceffeccee..e6256d0aa 100644 --- a/lib/_emerge/EbuildPhase.py +++ b/lib/_emerge/EbuildPhase.py @@ -9,12 +9,11 @@ import tempfile from _emerge.AsynchronousLock import AsynchronousLock from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor -from _emerge.CompositeTask import CompositeTask -from _emerge.EbuildProcess import EbuildProcess from _emerge.MiscFunctionsProcess import MiscFunctionsProcess +from _emerge.EbuildProcess import EbuildProcess +from _emerge.CompositeTask import CompositeTask from _emerge.PackagePhase import PackagePhase from _emerge.TaskSequence import TaskSequence - from portage.package.ebuild._ipc.QueryCommand import QueryCommand from portage.util._dyn_libs.soname_deps_qa import ( _get_all_provides, @@ -397,6 +396,7 @@ class EbuildPhase(CompositeTask): fd_pipes=self.fd_pipes, phase=phase, scheduler=self.scheduler, settings=self.settings) self._start_task(clean_phase, self._fail_clean_exit) + return def _fail_clean_exit(self, clean_phase): self._final_exit(clean_phase) diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py index b6c77ecad..1dcb47020 100644 --- a/lib/_emerge/resolver/output.py +++ b/lib/_emerge/resolver/output.py @@ -243,6 +243,7 @@ class Display: cur_use_map[key], old_iuse_map[key], old_use_map[key], is_new, feature_flags, reinst_flags_map.get(key)) + return @staticmethod @@ -538,6 +539,7 @@ class Display: if show_repos and repoadd: myprint += " " + teal("[%s]" % repoadd) writemsg_stdout("%s\n" % (myprint,), noiselevel=-1) + return def print_blockers(self): @@ -546,6 +548,7 @@ class Display: """ for pkg in self.blockers: writemsg_stdout("%s\n" % (pkg,), noiselevel=-1) + return def print_verbose(self, show_repos): @@ -559,6 +562,7 @@ class Display: # that RepoDisplay.__unicode__() is called in python2. writemsg_stdout("%s" % (self.conf.repo_display,), noiselevel=-1) + return def print_changelog(self): @@ -683,6 +687,7 @@ class Display: if ebuild_path_cl is not None: self.changelogs.extend(_calc_changelog( ebuild_path_cl, pkg_info.previous_pkg, pkg.cpv)) + return def check_system_world(self, pkg): diff --git a/lib/portage/elog/mod_custom.py b/lib/portage/elog/mod_custom.py index aaf1d3b1b..7cfafeccc 100644 --- a/lib/portage/elog/mod_custom.py +++ b/lib/portage/elog/mod_custom.py @@ -18,3 +18,4 @@ def process(mysettings, key, logentries, fulltext): retval = portage.process.spawn_bash(mylogcmd) if retval != 0: raise portage.exception.PortageException("!!! PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval) + return diff --git a/lib/portage/elog/mod_echo.py b/lib/portage/elog/mod_echo.py index a026847b7..80f2b11ac 100644 --- a/lib/portage/elog/mod_echo.py +++ b/lib/portage/elog/mod_echo.py @@ -3,10 +3,9 @@ # Distributed under the terms of the GNU General Public License v2 import sys - +from portage.output import EOutput, colorize from portage.const import EBUILD_PHASES from portage.localization import _ -from portage.output import EOutput, colorize _items = [] @@ -62,3 +61,4 @@ def _finalize(): for line in msgcontent: fmap[msgtype](line.strip("\n")) _items = [] + return diff --git a/lib/portage/elog/mod_mail.py b/lib/portage/elog/mod_mail.py index f737a80ce..38eaa277f 100644 --- a/lib/portage/elog/mod_mail.py +++ b/lib/portage/elog/mod_mail.py @@ -41,3 +41,5 @@ def process(mysettings, key, logentries, fulltext): portage.mail.send_mail(mysettings, mymessage) except PortageException as e: writemsg("%s\n" % str(e), noiselevel=-1) + + return diff --git a/lib/portage/glsa.py b/lib/portage/glsa.py index 1870d9338..9260e7e09 100644 --- a/lib/portage/glsa.py +++ b/lib/portage/glsa.py @@ -492,6 +492,7 @@ class Glsa: finally: f.close() + return None def parse(self, myfile): """ @@ -582,6 +583,7 @@ class Glsa: self.packages[name].append(tmp) # TODO: services aren't really used yet self.services = self.affected.getElementsByTagName("service") + return None def dump(self, outstream=sys.stdout, encoding="utf-8"): """ @@ -682,6 +684,7 @@ class Glsa: mode='a+', encoding=_encodings['content'], errors='strict') checkfile.write(_unicode_decode(self.nr + "\n")) checkfile.close() + return None def getMergeList(self, least_change=True): """ diff --git a/lib/portage/mail.py b/lib/portage/mail.py index f4fccd8c2..6503b4cc9 100644 --- a/lib/portage/mail.py +++ b/lib/portage/mail.py @@ -136,3 +136,4 @@ def send_mail(mysettings, message): raise portage.exception.PortageException(_("!!! An error occurred while trying to send logmail:\n")+str(e)) except socket.error as e: raise portage.exception.PortageException(_("!!! A network error occurred while trying to send logmail:\n%s\nSure you configured PORTAGE_ELOG_MAILURI correctly?") % str(e)) + return diff --git a/lib/portage/sync/controller.py b/lib/portage/sync/controller.py index 24ebf4ff8..cb68e2c37 100644 --- a/lib/portage/sync/controller.py +++ b/lib/portage/sync/controller.py @@ -174,7 +174,7 @@ class SyncManager: def do_callback(self, result): - # print("result:", result, "callback()", self.callback) + #print("result:", result, "callback()", self.callback) exitcode, updatecache_flg = result self.exitcode = exitcode self.updatecache_flg = updatecache_flg @@ -184,6 +184,7 @@ class SyncManager: writemsg_level(msg + "\n") if self.callback: self.callback(exitcode, updatecache_flg) + return def perform_post_sync_hook(self, reponame, dosyncuri='', repolocation=''): diff --git a/lib/portage/util/whirlpool.py b/lib/portage/util/whirlpool.py index 857abf3ac..1071d5155 100644 --- a/lib/portage/util/whirlpool.py +++ b/lib/portage/util/whirlpool.py @@ -634,6 +634,7 @@ class WhirlpoolStruct: def WhirlpoolInit(ctx): ctx = WhirlpoolStruct() + return def WhirlpoolAdd(source, sourceBits, ctx): if not isinstance(source, bytes): @@ -776,6 +777,7 @@ def processBuffer(ctx): # apply the Miyaguchi-Preneel compression function for i in range(8): ctx.hash[i] ^= state[i] ^ block[i] + return # # Tests. diff --git a/pylintrc b/pylintrc index ce5dec11b..f2aadf14f 100644 --- a/pylintrc +++ b/pylintrc @@ -33,7 +33,6 @@ enable= unused-import, useless-import-alias, useless-object-inheritance, - useless-return, wildcard-import # A comma-separated list of package or module names from where C extensions may -- 2.28.0