cubicweb/server/sources/__init__.py
branch3.25
changeset 12156 0d1d22a3a48b
parent 12155 4ba8fd2cd41a
child 12567 26744ad37953
--- a/cubicweb/server/sources/__init__.py	Wed Apr 12 16:12:51 2017 +0200
+++ b/cubicweb/server/sources/__init__.py	Wed Apr 12 16:14:10 2017 +0200
@@ -85,7 +85,7 @@
 
     # these are overridden by set_log_methods below
     # only defining here to prevent pylint from complaining
-    info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+    info = warning = error = critical = exception = debug = lambda msg, *a, **kw: None
 
     def __init__(self, repo, source_config, eid=None):
         self.repo = repo
@@ -213,12 +213,13 @@
             self.urls = []
 
     PUBLIC_KEYS = ('type', 'uri', 'use-cwuri-as-url')
+
     def remove_sensitive_information(self, sourcedef):
         """remove sensitive information such as login / password from source
         definition
         """
         for key in list(sourcedef):
-            if not key in self.PUBLIC_KEYS:
+            if key not in self.PUBLIC_KEYS:
                 sourcedef.pop(key)
 
     # connections handling #####################################################
@@ -282,7 +283,7 @@
         """add a relation to the source"""
         raise NotImplementedError(self)
 
-    def add_relations(self, cnx,  rtype, subj_obj_list):
+    def add_relations(self, cnx, rtype, subj_obj_list):
         """add a relations to the source"""
         # override in derived classes if you feel you can
         # optimize