diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2015-07-21 19:56:43 -0300 |
---|---|---|
committer | Bruno Wagner <bwgpro@gmail.com> | 2015-07-21 19:56:43 -0300 |
commit | 11d4373226c8ab32c31fa92beed8aedb962dd756 (patch) | |
tree | 2352ca0eb1023935c5a64137806a625141e47e10 /src/leap/mail/adaptors/models.py | |
parent | 63e643466882996f32eba1c0f79ebdd3ceb5f3b3 (diff) |
Transformed assigned lambdas to functions in models and test_models because of pep8
Diffstat (limited to 'src/leap/mail/adaptors/models.py')
-rw-r--r-- | src/leap/mail/adaptors/models.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/leap/mail/adaptors/models.py b/src/leap/mail/adaptors/models.py index 88e0e4e..c5b838a 100644 --- a/src/leap/mail/adaptors/models.py +++ b/src/leap/mail/adaptors/models.py @@ -115,10 +115,8 @@ class DocumentWrapper(object): def _normalize_dict(_dict): items = _dict.items() - not_callable = lambda (k, v): not callable(v) - not_private = lambda(k, v): not k.startswith('_') - for cond in not_callable, not_private: - items = filter(cond, items) + items = filter(lambda k, v: not callable(v), items) + items = filter(lambda k, v: not k.startswith('_')) items = [(k, v) if not k.endswith('_') else (k[:-1], v) for (k, v) in items] items = [(k.replace('-', '_'), v) for (k, v) in items] |