Apply defaults to all of the configs. Much fewer .get()s

This commit is contained in:
Anthony Sottile
2014-03-31 23:22:13 -07:00
parent b23ad5d6a3
commit ac67af21ec
13 changed files with 73 additions and 48 deletions

View File

@@ -27,9 +27,7 @@ class Repository(object):
@cached_property
def languages(self):
return set(filter(None, (
hook.get('language') for hook in self.hooks.values()
)))
return set(hook['language'] for hook in self.hooks.values())
@cached_property
def hooks(self):