[PATCH 1 of 2 skos] [flake8] Fix W504 line break after binary operator

Denis Laxalde denis.laxalde at logilab.fr
Mon Oct 29 18:09:51 CET 2018


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1540832015 -3600
#      Mon Oct 29 17:53:35 2018 +0100
# Node ID b37b306c597c49196a9e27c4153fb8ea7cc548bd
# Parent  e4023898cbe48ad2fa22e29c9df891d922d76399
# Available At http://hg.logilab.org/review/cubes/skos
#              hg pull http://hg.logilab.org/review/cubes/skos -r b37b306c597c
[flake8] Fix W504 line break after binary operator

Spotted by flake8 version 3.6.0.

diff --git a/cubicweb_skos/views/__init__.py b/cubicweb_skos/views/__init__.py
--- a/cubicweb_skos/views/__init__.py
+++ b/cubicweb_skos/views/__init__.py
@@ -182,8 +182,8 @@ class ConceptPrimaryView(tabs.TabbedPrim
 class ConceptConceptsTab(tabs.TabsMixin, EntityView):
     """display a SKOS concept tree"""
     __regid__ = 'skos_sub_concepts_tab'  # don't use '.' in tab's regid
-    __select__ = (is_instance('Concept') &
-                  has_related_entities('narrower_concept'))
+    __select__ = (is_instance('Concept')
+                  & has_related_entities('narrower_concept'))
 
     def entity_call(self, entity):
         rset = entity.related('narrower_concept')
@@ -209,9 +209,9 @@ class ConceptLabelsComponent(component.E
 class ConceptMultiSchemeComponent(component.EntityCtxComponent):
     """display a SKOS concept's schemes if there are more than one"""
     __regid__ = 'skos.concept.parent-schemes'
-    __select__ = (component.EntityCtxComponent.__select__ &
-                  is_instance('Concept') &
-                  score_entity(lambda x: len(x.in_scheme) > 1))
+    __select__ = (component.EntityCtxComponent.__select__
+                  & is_instance('Concept')
+                  & score_entity(lambda x: len(x.in_scheme) > 1))
     title = _('ConceptScheme_plural')
     context = 'navcontentbottom'
     order = 1
@@ -288,10 +288,10 @@ class ConceptSchemeEditController(editco
     """Custom edit controller for ConceptScheme entity to handle import of
     concepts from file provided in edition form.
     """
-    __select__ = (editcontroller.EditController.__select__ &
-                  match_edited_type('ConceptScheme') &
-                  match_form_params('stream', 'format', 'encoding', 'language_code', 'delimiter') &
-                  params_in_form('stream'))
+    __select__ = (editcontroller.EditController.__select__
+                  & match_edited_type('ConceptScheme')
+                  & match_form_params('stream', 'format', 'encoding', 'language_code', 'delimiter')
+                  & params_in_form('stream'))
 
     def edit_entity(self, formparams, multiple=False):
         """Use created entity and import concepts from specified file."""



More information about the saem-devel mailing list