Reformat offlineimap/CustomConfig.py
Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
parent
9f15c05520
commit
8b35dbabe1
@ -36,7 +36,6 @@ class CustomConfigParser(SafeConfigParser):
|
||||
else:
|
||||
return default
|
||||
|
||||
|
||||
def getdefaultint(self, section, option, default, *args, **kwargs):
|
||||
"""Same as config.getint, but returns the value of `default`
|
||||
if there is no such option specified."""
|
||||
@ -46,7 +45,6 @@ class CustomConfigParser(SafeConfigParser):
|
||||
else:
|
||||
return default
|
||||
|
||||
|
||||
def getdefaultfloat(self, section, option, default, *args, **kwargs):
|
||||
"""Same as config.getfloat, but returns the value of `default`
|
||||
if there is no such option specified."""
|
||||
@ -131,7 +129,6 @@ class CustomConfigParser(SafeConfigParser):
|
||||
if not self.has_option(section, option):
|
||||
self.set(section, option, value)
|
||||
|
||||
|
||||
def apply_xforms(self, string, transforms):
|
||||
"""Applies set of transformations to a string.
|
||||
|
||||
@ -150,7 +147,6 @@ class CustomConfigParser(SafeConfigParser):
|
||||
return string
|
||||
|
||||
|
||||
|
||||
def CustomConfigDefault():
|
||||
"""Just a constant that won't occur anywhere else.
|
||||
|
||||
@ -161,7 +157,6 @@ def CustomConfigDefault():
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class ConfigHelperMixin(object):
|
||||
"""Allow comfortable retrieving of config values pertaining
|
||||
to a section.
|
||||
@ -208,8 +203,6 @@ class ConfigHelperMixin(object):
|
||||
raise NotImplementedError("ConfigHelperMixin.getconfig() "
|
||||
"is to be overriden")
|
||||
|
||||
|
||||
|
||||
def getsection(self):
|
||||
"""Returns name of configuration section in which our
|
||||
class keeps its configuration.
|
||||
@ -219,7 +212,6 @@ class ConfigHelperMixin(object):
|
||||
raise NotImplementedError("ConfigHelperMixin.getsection() "
|
||||
"is to be overriden")
|
||||
|
||||
|
||||
def getconf(self, option, default=CustomConfigDefault):
|
||||
"""Retrieves string from the configuration.
|
||||
|
||||
@ -233,7 +225,6 @@ class ConfigHelperMixin(object):
|
||||
self.getconfig().getdefault,
|
||||
self.getconfig().get)
|
||||
|
||||
|
||||
def getconf_xform(self, option, xforms, default=CustomConfigDefault):
|
||||
"""Retrieves string from the configuration transforming the result.
|
||||
|
||||
@ -249,7 +240,6 @@ class ConfigHelperMixin(object):
|
||||
value = self.getconf(option, default)
|
||||
return self.getconfig().apply_xforms(value, xforms)
|
||||
|
||||
|
||||
def getconfboolean(self, option, default=CustomConfigDefault):
|
||||
"""Retrieves boolean value from the configuration.
|
||||
|
||||
@ -263,7 +253,6 @@ class ConfigHelperMixin(object):
|
||||
self.getconfig().getdefaultboolean,
|
||||
self.getconfig().getboolean)
|
||||
|
||||
|
||||
def getconfint(self, option, default=CustomConfigDefault):
|
||||
"""
|
||||
Retrieves integer value from the configuration.
|
||||
@ -279,7 +268,6 @@ class ConfigHelperMixin(object):
|
||||
self.getconfig().getdefaultint,
|
||||
self.getconfig().getint)
|
||||
|
||||
|
||||
def getconffloat(self, option, default=CustomConfigDefault):
|
||||
"""Retrieves floating-point value from the configuration.
|
||||
|
||||
@ -293,7 +281,6 @@ class ConfigHelperMixin(object):
|
||||
self.getconfig().getdefaultfloat,
|
||||
self.getconfig().getfloat)
|
||||
|
||||
|
||||
def getconflist(self, option, separator_re,
|
||||
default=CustomConfigDefault):
|
||||
"""Retrieves strings from the configuration and splits it
|
||||
|
Loading…
Reference in New Issue
Block a user