Base.py added docstrings
This patch adds multiple docstrings.
This commit is contained in:
parent
62bfead5e4
commit
20e3323718
@ -25,6 +25,9 @@ from offlineimap.error import OfflineImapError
|
|||||||
|
|
||||||
|
|
||||||
class BaseRepository(CustomConfig.ConfigHelperMixin):
|
class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||||
|
"""
|
||||||
|
Base Class for Repository
|
||||||
|
"""
|
||||||
def __init__(self, reposname, account):
|
def __init__(self, reposname, account):
|
||||||
self.ui = getglobalui()
|
self.ui = getglobalui()
|
||||||
self.account = account
|
self.account = account
|
||||||
@ -83,15 +86,39 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def holdordropconnections(self):
|
def holdordropconnections(self):
|
||||||
|
"""
|
||||||
|
Hold the drop connections functions.
|
||||||
|
|
||||||
|
Returns: None
|
||||||
|
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def dropconnections(self):
|
def dropconnections(self):
|
||||||
|
"""
|
||||||
|
Drop connections functions.
|
||||||
|
|
||||||
|
Returns: None
|
||||||
|
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def getaccount(self):
|
def getaccount(self):
|
||||||
|
"""
|
||||||
|
This patch returns the account
|
||||||
|
|
||||||
|
Returns: The account
|
||||||
|
|
||||||
|
"""
|
||||||
return self.account
|
return self.account
|
||||||
|
|
||||||
def getname(self):
|
def getname(self):
|
||||||
|
"""
|
||||||
|
Get the repository name
|
||||||
|
|
||||||
|
Returns: String with the repository name
|
||||||
|
|
||||||
|
"""
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@ -104,9 +131,21 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
|||||||
return self._accountname
|
return self._accountname
|
||||||
|
|
||||||
def getuiddir(self):
|
def getuiddir(self):
|
||||||
|
"""
|
||||||
|
The FolderValidity directory
|
||||||
|
|
||||||
|
Returns: The FolderValidity directory
|
||||||
|
|
||||||
|
"""
|
||||||
return self.uiddir
|
return self.uiddir
|
||||||
|
|
||||||
def getmapdir(self):
|
def getmapdir(self):
|
||||||
|
"""
|
||||||
|
Get the map dir (UIDMapping)
|
||||||
|
|
||||||
|
Returns: The UIDMapping directory
|
||||||
|
|
||||||
|
"""
|
||||||
return self.mapdir
|
return self.mapdir
|
||||||
|
|
||||||
# Interface from CustomConfig.ConfigHelperMixin
|
# Interface from CustomConfig.ConfigHelperMixin
|
||||||
@ -124,6 +163,12 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
|||||||
return self._readonly
|
return self._readonly
|
||||||
|
|
||||||
def getlocaleval(self):
|
def getlocaleval(self):
|
||||||
|
"""
|
||||||
|
Get the account local eval.
|
||||||
|
|
||||||
|
Returns: LocalEval class for account.
|
||||||
|
|
||||||
|
"""
|
||||||
return self.account.getlocaleval()
|
return self.account.getlocaleval()
|
||||||
|
|
||||||
def getfolders(self):
|
def getfolders(self):
|
||||||
@ -138,9 +183,25 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def getsep(self):
|
def getsep(self):
|
||||||
|
"""
|
||||||
|
Get the separator.
|
||||||
|
|
||||||
|
This function is not implemented.
|
||||||
|
|
||||||
|
Returns: None
|
||||||
|
|
||||||
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def getkeywordmap(self):
|
def getkeywordmap(self):
|
||||||
|
"""
|
||||||
|
Get the keyword map.
|
||||||
|
|
||||||
|
This function is not implemented.
|
||||||
|
|
||||||
|
Returns: None
|
||||||
|
|
||||||
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def should_sync_folder(self, fname):
|
def should_sync_folder(self, fname):
|
||||||
@ -158,11 +219,30 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
|||||||
True)
|
True)
|
||||||
|
|
||||||
def makefolder(self, foldername):
|
def makefolder(self, foldername):
|
||||||
"""Create a new folder."""
|
"""
|
||||||
|
Create a new folder.
|
||||||
|
This function is not implemented
|
||||||
|
|
||||||
|
Args:
|
||||||
|
foldername: Folder to create
|
||||||
|
|
||||||
|
Returns: None
|
||||||
|
|
||||||
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def deletefolder(self, foldername):
|
def deletefolder(self, foldername):
|
||||||
|
"""
|
||||||
|
Remove the selected folder.
|
||||||
|
|
||||||
|
This function is not implemented
|
||||||
|
|
||||||
|
Args:
|
||||||
|
foldername: Folder to delete
|
||||||
|
|
||||||
|
Returns: None
|
||||||
|
|
||||||
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def getfolder(self, foldername, decode=True):
|
def getfolder(self, foldername, decode=True):
|
||||||
|
Loading…
Reference in New Issue
Block a user