diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-12-20 10:49:16 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-12-21 17:18:39 -0800 |
commit | bcde6f09e8abe8248c729783c1821f0d646c71db (patch) | |
tree | 6ad98dde7f5629b526411481e8925f1f3bc42e7c /alot | |
parent | e6fbfd5aab0d8fd9873ebe04f318180287872285 (diff) |
settings/manager: remove list comprehension for clarity
The use of a list comprehension here saves one line of code, but doesn't
make the code clearer, a simple loop is more obvious. This also replaces
``if not v or v == ''`` with simply ``if not v``, since they're
equivalent.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/settings/manager.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py index 5718193f..253171d1 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -354,8 +354,9 @@ class SettingsManager(object): if value and value != '': globalmaps[key] = value # get rid of empty commands left in mode bindings - for key in [k for k, v in modemaps.items() if not v or v == '']: - del modemaps[key] + for k, v in modemaps.items(): + if not v: + del modemaps[k] return globalmaps, modemaps |