[PATCH 12 of 18 Nosylist cube] [autopep8] E302 - Add missing 2 blank lines

Nsukami Patrick ndkpatt at gmail.com
Thu Jun 13 12:02:10 CEST 2019


# HG changeset patch
# User Nsukami Patrick <ndkpatt at gmail dot com>
# Date 1560419491 0
#      Thu Jun 13 09:51:31 2019 +0000
# Node ID 1aa3dad15860fc1849b92b59062f3f37033ce2e5
# Parent  a1d753ca12aef882751e57a50b73db3c6753a509
[autopep8] E302 - Add missing 2 blank lines

diff --git a/cubicweb_nosylist/hooks.py b/cubicweb_nosylist/hooks.py
--- a/cubicweb_nosylist/hooks.py
+++ b/cubicweb_nosylist/hooks.py
@@ -2,6 +2,7 @@
 from cubicweb.server import hook
 from cubicweb.predicates import relation_possible
 
+
 class INotificationBaseAddedHook(hook.Hook):
     """automatically register the user creating a ticket as interested by it
     """
@@ -48,6 +49,7 @@
 # relations where the "main" entity is the object
 O_RELS = set()
 
+
 class NosyListPropagationHook(hook.PropagateRelationHook):
     """propagate permissions when new entity are added"""
     __regid__ = 'nosy_list_propagation_hook'
@@ -62,6 +64,7 @@
 SKIP_S_RELS = set()
 SKIP_O_RELS = set()
 
+
 class NosyListAddPropagationHook(hook.PropagateRelationAddHook):
     """propagate permissions when new entity are added"""
     __regid__ = 'nosy_list_add_propagation_hook'
diff --git a/cubicweb_nosylist/interfaces.py b/cubicweb_nosylist/interfaces.py
--- a/cubicweb_nosylist/interfaces.py
+++ b/cubicweb_nosylist/interfaces.py
@@ -2,6 +2,7 @@
 
 from logilab.common.interface import Interface
 
+
 class INosyList(Interface):
     """Interface for entity for which we provide nosy_list mechanism.
     """
diff --git a/cubicweb_nosylist/schema.py b/cubicweb_nosylist/schema.py
--- a/cubicweb_nosylist/schema.py
+++ b/cubicweb_nosylist/schema.py
@@ -9,6 +9,7 @@
 from yams.buildobjs import RelationType
 from cubicweb.schema import RRQLExpression
 
+
 class interested_in(RelationType):
     """relation to explicitly note interest about something"""
     __permissions__ = {
@@ -18,6 +19,7 @@
     }
     subject = 'CWUser'
 
+
 class nosy_list(RelationType):
     """relation handled internaly to control who will be notified"""
     __permissions__ = {
diff --git a/cubicweb_nosylist/sobjects.py b/cubicweb_nosylist/sobjects.py
--- a/cubicweb_nosylist/sobjects.py
+++ b/cubicweb_nosylist/sobjects.py
@@ -11,6 +11,7 @@
 from cubicweb.predicates import relation_possible
 from cubicweb.sobjects.notification import RecipientsFinder
 
+
 class NosyListRecipientsFinder(RecipientsFinder):
     # action=None to by pass security checking
     __select__ = relation_possible('nosy_list', 'subject', action=None)
diff --git a/cubicweb_nosylist/views.py b/cubicweb_nosylist/views.py
--- a/cubicweb_nosylist/views.py
+++ b/cubicweb_nosylist/views.py
@@ -81,12 +81,14 @@
             xml_escape(title), entity.eid, xml_escape(text),
            ))
 
+
 def has_user_interest(cnx, user, entity):
     """return true if the user is currently interested in the entity"""
     return bool(cnx.execute(
         'Any X WHERE U interested_in X, U eid %(u)s, X eid %(x)s',
         {'u': user.eid, 'x': entity.eid}))
 
+
 def user_in_nosy_list(cnx, user, entity):
     """return true if the user is in the nosy list for the entity"""
     return bool(cnx.execute(
@@ -338,6 +340,7 @@
     def action(self):
         return self._cw.build_url('validateform')
 
+
 @ajaxfunc(output_type='json')
 def toggle_nosylist(self, eid):
     req = self._cw
diff --git a/test/data/schema.py b/test/data/schema.py
--- a/test/data/schema.py
+++ b/test/data/schema.py
@@ -1,12 +1,15 @@
 from yams.buildobjs import EntityType, RelationDefinition, String
 
+
 class ObjectOfInterest(EntityType):
     name = String(required=True, unique=True)
 
+
 class interested_in(RelationDefinition):
     subject = 'CWUser'
     object = 'ObjectOfInterest'
 
+
 class nosy_list(RelationDefinition):
     subject = 'ObjectOfInterest'
     object = 'CWUser'
diff --git a/test/unittest_nosylist.py b/test/unittest_nosylist.py
--- a/test/unittest_nosylist.py
+++ b/test/unittest_nosylist.py
@@ -2,6 +2,7 @@
 
 from cubicweb.devtools.testlib import CubicWebTC
 
+
 class NosyListTestsCubicWebTC(CubicWebTC):
     """test nosylist specific behaviors"""
 



More information about the cubicweb-devel mailing list