Browse Source

PEP8/Pylint on types.py

Roland Haroutiounian 9 years ago
parent
commit
33a7b6c4a4
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      EditorialModel/types.py

+ 3
- 4
EditorialModel/types.py View File

216
     ## @brief Given a relation's nature return all the possible type to add as superiors
216
     ## @brief Given a relation's nature return all the possible type to add as superiors
217
     # @param relation_nature str | None : if None check for all natures
217
     # @param relation_nature str | None : if None check for all natures
218
     # @return a list or a dict with nature as key
218
     # @return a list or a dict with nature as key
219
-    def possible_superiors(self, relation_nature = None):
219
+    def possible_superiors(self, relation_nature=None):
220
         if relation_nature is None:
220
         if relation_nature is None:
221
             ret = {}
221
             ret = {}
222
             for nat in EmNature.getall():
222
             for nat in EmNature.getall():
229
 
229
 
230
         att = self.classtype['hierarchy'][relation_nature]['attach']
230
         att = self.classtype['hierarchy'][relation_nature]['attach']
231
         if att == 'type':
231
         if att == 'type':
232
-            return [ self ]
232
+            return [self]
233
         else:
233
         else:
234
-           return [ t for t in self.model.components(EmType) if t.classtype == self.classtype ]
235
-
234
+            return [t for t in self.model.components(EmType) if t.classtype == self.classtype]
236
 
235
 
237
     ## Add a superior in the type hierarchy
236
     ## Add a superior in the type hierarchy
238
     # @param em_type EmType: An EmType instance
237
     # @param em_type EmType: An EmType instance

Loading…
Cancel
Save