[saem-devel] [PATCH sherpa] Flake8 fixes

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Feb 21 17:46:42 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1487695501 -3600
#      Tue Feb 21 17:45:01 2017 +0100
# Node ID 5a38bda4898cc3f3d7a5d6c00c0fe58a5dc07707
# Parent  c8365d3bfd84cf49fd4cb6dba0ee3b5be2af0574
Flake8 fixes

diff --git a/views/__init__.py b/views/__init__.py
--- a/views/__init__.py
+++ b/views/__init__.py
@@ -15,11 +15,10 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
 from jinja2 import Environment, PackageLoader
 
-from cubicweb import _
 from cubicweb.view import View
 from cubicweb.web.views import urlrewrite, startup
 
 _JINJA_ENV = Environment(loader=PackageLoader('cubes.sherpa.views'))
 
@@ -49,11 +48,11 @@ def jinja_static_view(template_name, tit
 
     `__regid__` is built by prepending 'sherpa.' to template_name.
     """
     class_name = template_name.capitalize() + 'View'
     regid = 'sherpa.' + template_name
-    if (template_name == 'index') :
+    if template_name == 'index':
         regid = 'index'
 
     return type(class_name, (JinjaStaticView,), {'__regid__': regid,
                                                  'template_name': template_name,
                                                  'title': title})
@@ -62,10 +61,11 @@ def jinja_static_view(template_name, tit
 ProjectView = jinja_static_view('project', u'Sherpa un générateur de profils')
 UtilisationView = jinja_static_view('utilisation', u'Pour commencer')
 SedaView = jinja_static_view('seda', u'Le SEDA')
 IndexView = jinja_static_view('index')
 
+
 class SherpaReqRewriter(urlrewrite.SimpleReqRewriter):
     rules = [
         (urlrewrite.rgx('/'), dict(vid='sherpa.index')),
         (urlrewrite.rgx('/project'), dict(vid='sherpa.project')),
         (urlrewrite.rgx('/utilisation'), dict(vid='sherpa.utilisation')),


More information about the saem-devel mailing list