helpers: wrap long lines to avoid pylint C0301
authorW. Trevor King <wking@tremily.us>
Sun, 11 Nov 2012 16:27:57 +0000 (11:27 -0500)
committerW. Trevor King <wking@tremily.us>
Sun, 11 Nov 2012 21:19:50 +0000 (16:19 -0500)
pym/gentoolkit/helpers.py

index ba8661d2e5e84a48a6705c33994060a6571473bc..a87b9f2bbb527c02eb66d6c3edf4d3e9594e2676 100644 (file)
@@ -388,11 +388,16 @@ def get_cpvs(predicate=None, include_installed=True):
        """
 
        if predicate:
-               all_cps = iter(x for x in portage.db[portage.root]["porttree"].dbapi.cp_all() if predicate(x))
+               all_cps = iter(
+                       x for x
+                       in portage.db[portage.root]["porttree"].dbapi.cp_all()
+                       if predicate(x))
        else:
                all_cps = portage.db[portage.root]["porttree"].dbapi.cp_all()
 
-       all_cpvs = chain.from_iterable(portage.db[portage.root]["porttree"].dbapi.cp_list(x) for x in all_cps)
+       all_cpvs = chain.from_iterable(
+               portage.db[portage.root]["porttree"].dbapi.cp_list(x)
+               for x in all_cps)
        all_installed_cpvs = set(get_installed_cpvs(predicate))
 
        if include_installed:
@@ -424,11 +429,17 @@ def get_installed_cpvs(predicate=None):
        """
 
        if predicate:
-               installed_cps = iter(x for x in portage.db[portage.root]["vartree"].dbapi.cp_all() if predicate(x))
+               installed_cps = iter(
+                       x for x
+                       in portage.db[portage.root]["vartree"].dbapi.cp_all()
+                       if predicate(x))
        else:
-               installed_cps = portage.db[portage.root]["vartree"].dbapi.cp_all()
+               installed_cps = (
+                       portage.db[portage.root]["vartree"].dbapi.cp_all())
 
-       for cpv in chain.from_iterable(portage.db[portage.root]["vartree"].dbapi.cp_list(x) for x in installed_cps):
+       for cpv in chain.from_iterable(
+               portage.db[portage.root]["vartree"].dbapi.cp_list(x)
+               for x in installed_cps):
                yield cpv
 
 
@@ -443,11 +454,17 @@ def get_bintree_cpvs(predicate=None):
        """
 
        if predicate:
-               installed_cps = iter(x for x in portage.db[portage.root]["bintree"].dbapi.cp_all() if predicate(x))
+               installed_cps = iter(
+                       x for x
+                       in portage.db[portage.root]["bintree"].dbapi.cp_all()
+                       if predicate(x))
        else:
-               installed_cps = portage.db[portage.root]["bintree"].dbapi.cp_all()
+               installed_cps = (
+                       portage.db[portage.root]["bintree"].dbapi.cp_all())
 
-       for cpv in chain.from_iterable(portage.db[portage.root]["bintree"].dbapi.cp_list(x) for x in installed_cps):
+       for cpv in chain.from_iterable(
+               portage.db[portage.root]["bintree"].dbapi.cp_list(x)
+               for x in installed_cps):
                yield cpv