From e015012da100bbfcde7e0b4825ab89a373e06f25 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sat, 28 Aug 2021 00:27:53 +0200 Subject: [PATCH] pylint: enable useless-return Signed-off-by: Johannes Berg Reviewed-by: Rob Browning Tested-by: Rob Browning --- .pylintrc | 3 ++- lib/bup/cmd/ftp.py | 1 - lib/bup/compat.py | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.pylintrc b/.pylintrc index 693101b..1b6370b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -6,4 +6,5 @@ enable= return-in-init, trailing-whitespace, unused-import, - unused-wildcard-import + unused-wildcard-import, + useless-return diff --git a/lib/bup/cmd/ftp.py b/lib/bup/cmd/ftp.py index 8b7fe9d..33fd804 100755 --- a/lib/bup/cmd/ftp.py +++ b/lib/bup/cmd/ftp.py @@ -55,7 +55,6 @@ def attempt_completion(text, start, end): global _attempt_start, _attempt_end _attempt_start = start _attempt_end = end - return None _last_line = None _last_res = None diff --git a/lib/bup/compat.py b/lib/bup/compat.py index fb45ead..c3225a5 100644 --- a/lib/bup/compat.py +++ b/lib/bup/compat.py @@ -49,7 +49,6 @@ if py3: def __exit__(self, exc_type, exc_value, traceback): if not exc_type: raise self.ex - return None def items(x): return x.items() @@ -131,13 +130,11 @@ else: # Python 2 self.ex = ex def __enter__(self): add_ex_tb(self.ex) - return None def __exit__(self, exc_type, exc_value, traceback): if not exc_type: raise self.ex add_ex_tb(exc_value) add_ex_ctx(exc_value, self.ex) - return None def dump_traceback(ex): stack = [ex] -- 2.39.2