Reformat offlineimap/folder/LocalStatus.py

Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-29 19:52:56 +02:00
parent 80ee751243
commit 8ed3d1ca9a

View File

@ -54,7 +54,7 @@ class LocalStatusRepository(BaseRepository):
self._folders = {} self._folders = {}
def _instanciatefolder(self, foldername): def _instanciatefolder(self, foldername):
return self.LocalStatusFolderClass(foldername, self) # Instanciate. return self.LocalStatusFolderClass(foldername, self) # Instantiate.
def setup_backend(self, backend): def setup_backend(self, backend):
if backend in list(self.backends.keys()): if backend in list(self.backends.keys()):
@ -69,14 +69,14 @@ class LocalStatusRepository(BaseRepository):
continue continue
repobk = LocalStatusRepository(self.name, self.account) repobk = LocalStatusRepository(self.name, self.account)
repobk.setup_backend(bk) # Fake the backend. repobk.setup_backend(bk) # Fake the backend.
folderbk = dic['class'](folder.name, repobk) folderbk = dic['class'](folder.name, repobk)
# If backend contains data, import it to folder. # If backend contains data, import it to folder.
if not folderbk.isnewfolder(): if not folderbk.isnewfolder():
self.ui._msg("Migrating LocalStatus cache from %s to %s " self.ui._msg("Migrating LocalStatus cache from %s to %s "
"status folder for %s:%s"% "status folder for %s:%s" %
(bk, self._backend, self.name, folder.name)) (bk, self._backend, self.name, folder.name))
folderbk.cachemessagelist() folderbk.cachemessagelist()
folder.messagelist = folderbk.messagelist folder.messagelist = folderbk.messagelist
@ -90,7 +90,7 @@ class LocalStatusRepository(BaseRepository):
"""Create a LocalStatus Folder.""" """Create a LocalStatus Folder."""
if self.account.dryrun: if self.account.dryrun:
return # Bail out in dry-run mode. return # Bail out in dry-run mode.
# Create an empty StatusFolder. # Create an empty StatusFolder.
folder = self._instanciatefolder(foldername) folder = self._instanciatefolder(foldername)