From 62bfead5e4fdbd6da94b501dc690835afbb59815 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 09:29:31 +0100 Subject: [PATCH] Maildir.py split long lines This patch split long lines in less 80 chars. --- offlineimap/repository/Maildir.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/offlineimap/repository/Maildir.py b/offlineimap/repository/Maildir.py index 89886ad..b147384 100644 --- a/offlineimap/repository/Maildir.py +++ b/offlineimap/repository/Maildir.py @@ -37,7 +37,8 @@ class MaildirRepository(BaseRepository): self.root = self.getlocalroot() self.folders = None self.ui = getglobalui() - self.debug("MaildirRepository initialized, sep is %s" % repr(self.getsep())) + self.debug("MaildirRepository initialized, sep is %s" % + repr(self.getsep())) self.folder_atimes = [] # Create the top-level folder if it doesn't exist @@ -121,8 +122,10 @@ class MaildirRepository(BaseRepository): assert component not in ['new', 'cur', 'tmp'], \ "When using nested folders (/ as a Maildir separator), " \ "folder names may not contain 'new', 'cur', 'tmp'." - assert foldername.find('../') == -1, "Folder names may not contain ../" - assert not foldername.startswith('/'), "Folder names may not begin with /" + assert foldername.find('../') == -1, \ + "Folder names may not contain ../" + assert not foldername.startswith('/'), \ + "Folder names may not begin with /" # If we're using hierarchical folders, it's possible that # sub-folders may be created before higher-up ones. @@ -160,7 +163,8 @@ class MaildirRepository(BaseRepository): if foldername == foldr.name: return foldr raise OfflineImapError("getfolder() asked for a nonexisting " - "folder '%s'." % foldername, OfflineImapError.ERROR.FOLDER) + "folder '%s'." % foldername, + OfflineImapError.ERROR.FOLDER) def _getfolders_scandir(self, root, extension=None): """Recursively scan folder 'root'; return a list of MailDirFolder @@ -214,7 +218,8 @@ class MaildirRepository(BaseRepository): if self.getsep() == '/' and dirname != '': # Recursively check sub-directories for folders too. retval.extend(self._getfolders_scandir(root, foldername)) - self.debug("_GETFOLDERS_SCANDIR RETURNING %s" % repr([x.getname() for x in retval])) + self.debug("_GETFOLDERS_SCANDIR RETURNING %s" % + repr([x.getname() for x in retval])) return retval def getfolders(self):