summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2017-08-31 15:19:15 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2017-09-01 15:33:15 +0100
commit134d791f94dec9bf06b98a9881495a435c191bd3 (patch)
tree598cb50b34a1e8346c114dbf50c0a013cb3d5f48 /alot/settings
parent0df1c905aee10308069d9db9e396714feabc4ce4 (diff)
pep8 fixes
This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/manager.py12
-rw-r--r--alot/settings/utils.py1
2 files changed, 9 insertions, 4 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index 6c9e80fe..ed390e78 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -25,7 +25,8 @@ from .theme import Theme
DEFAULTSPATH = os.path.join(os.path.dirname(__file__), '..', 'defaults')
-DATA_DIRS = os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':')
+DATA_DIRS = os.environ.get('XDG_DATA_DIRS',
+ '/usr/local/share:/usr/share').split(':')
class SettingsManager(object):
@@ -37,8 +38,10 @@ class SettingsManager(object):
:param notmuch_rc: path to notmuch's config file
:type notmuch_rc: str
"""
- assert alot_rc is None or (isinstance(alot_rc, basestring) and os.path.exists(alot_rc))
- assert notmuch_rc is None or (isinstance(notmuch_rc, basestring) and os.path.exists(notmuch_rc))
+ assert alot_rc is None or (isinstance(alot_rc, basestring) and
+ os.path.exists(alot_rc))
+ assert notmuch_rc is None or (isinstance(notmuch_rc, basestring) and
+ os.path.exists(notmuch_rc))
self.hooks = None
self._mailcaps = mailcap.getcaps()
self._notmuchconfig = None
@@ -62,7 +65,8 @@ class SettingsManager(object):
Implementation Detail: this is the same code called by the constructor
to set bindings at alot startup.
"""
- self._bindings = ConfigObj(os.path.join(DEFAULTSPATH, 'default.bindings'))
+ self._bindings = ConfigObj(os.path.join(DEFAULTSPATH,
+ 'default.bindings'))
self.read_notmuch_config()
self.read_config()
diff --git a/alot/settings/utils.py b/alot/settings/utils.py
index ea56b264..d87157c3 100644
--- a/alot/settings/utils.py
+++ b/alot/settings/utils.py
@@ -9,6 +9,7 @@ from urwid import AttrSpec
from .errors import ConfigError
+
def read_config(configpath=None, specpath=None, checks=None):
"""
get a (validated) config object for given config file path.