[rest] a bit of pep8
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 08 Dec 2015 17:59:54 +0100
changeset 10953 8b8193046600
parent 10952 4f28cb25b6c1
child 10954 c44930ac9579
[rest] a bit of pep8
ext/rest.py
ext/test/unittest_rest.py
--- a/ext/rest.py	Tue Dec 08 10:24:44 2015 +0100
+++ b/ext/rest.py	Tue Dec 08 17:59:54 2015 +0100
@@ -51,7 +51,7 @@
 from cubicweb import UnknownEid
 from cubicweb.ext.html4zope import Writer
 
-from cubicweb.web.views import vid_from_rset # XXX better not to import c.w.views here...
+from cubicweb.web.views import vid_from_rset  # XXX better not to import c.w.views here...
 
 # We provide our own parser as an attempt to get rid of
 # state machine reinstanciation
@@ -70,6 +70,7 @@
 
 LOGGER = getLogger('cubicweb.rest')
 
+
 def eid_reference_role(role, rawtext, text, lineno, inliner,
                        options={}, content=[]):
     try:
@@ -99,6 +100,7 @@
     return [nodes.reference(rawtext, utils.unescape(rest), refuri=ref,
                             **options)], []
 
+
 def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
     """``:rql:`<rql-expr>``` or ``:rql:`<rql-expr>:<vid>```
 
@@ -132,6 +134,7 @@
     set_classes(options)
     return [nodes.raw('', content, format='html')], []
 
+
 def bookmark_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
     """``:bookmark:`<bookmark-eid>``` or ``:bookmark:`<eid>:<vid>```
 
@@ -189,6 +192,7 @@
     set_classes(options)
     return [nodes.raw('', content, format='html')], []
 
+
 def winclude_directive(name, arguments, options, content, lineno,
                        content_offset, block_text, state, state_machine):
     """Include a reST file as part of the content of this reST file.
@@ -254,6 +258,7 @@
 winclude_directive.options = {'literal': directives.flag,
                               'encoding': directives.encoding}
 
+
 class RQLTableDirective(Directive):
     """rql-table directive
 
--- a/ext/test/unittest_rest.py	Tue Dec 08 10:24:44 2015 +0100
+++ b/ext/test/unittest_rest.py	Tue Dec 08 17:59:54 2015 +0100
@@ -31,7 +31,7 @@
             self.assertEqual(rest_publish(context, ':eid:`%s`' % context.eid),
                              '<p><a class="reference" href="http://testing.fr/cubicweb/cwuser/admin">'
                              '#%s</a></p>\n' % context.eid)
-            self.assertEqual(rest_publish(context, ':eid:`%s:some text`' %  context.eid),
+            self.assertEqual(rest_publish(context, ':eid:`%s:some text`' % context.eid),
                              '<p><a class="reference" href="http://testing.fr/cubicweb/cwuser/admin">'
                              'some text</a></p>\n')