From b175f7a69852f1d4101629ec1915e7378bbabec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 1 Nov 2020 10:00:02 +0100 Subject: [PATCH] Base.py sync_folder_structure returns always None The function sync_folder_structure is only used in the accounts.py file: kix@inle:~/src/offlineimap3/offlineimap$ rgrep sync_folder_structure * accounts.py: remoterepos.sync_folder_structure(localrepos, statusrepos) repository/Base.py: def sync_folder_structure(self, local_repo, status_repo): kix@inle:~/src/offlineimap3/offlineimap$ The returned value is not used. We have this warning: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) Because is not returning anything here, but is returning None at the function end. We can include this None here safely. --- offlineimap/repository/Base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offlineimap/repository/Base.py b/offlineimap/repository/Base.py index 1418d83..af35d49 100644 --- a/offlineimap/repository/Base.py +++ b/offlineimap/repository/Base.py @@ -258,7 +258,7 @@ class BaseRepository(CustomConfig.ConfigHelperMixin): if not self.should_create_folders()\ and not local_repo.should_create_folders(): # Quick exit if no folder creation is enabled on either side. - return + return None remote_repo = self remote_hash, local_hash = {}, {}