Browse Source

Cleans up following PEP8 rules

Adrien Panay 7 years ago
parent
commit
3f99483cfc
1 changed files with 11 additions and 7 deletions
  1. 11 7
      tracim/tracim/controllers/admin/workspace.py

+ 11 - 7
tracim/tracim/controllers/admin/workspace.py View File

157
 
157
 
158
     @tg.expose('tracim.templates.admin.workspace_getall')
158
     @tg.expose('tracim.templates.admin.workspace_getall')
159
     def get_all(self, *args, **kw):
159
     def get_all(self, *args, **kw):
160
-
161
         user = tmpl_context.current_user
160
         user = tmpl_context.current_user
162
         workspace_api_controller = WorkspaceApi(user)
161
         workspace_api_controller = WorkspaceApi(user)
163
-
164
         workspaces = workspace_api_controller.get_all_manageable_for_user(user)
162
         workspaces = workspace_api_controller.get_all_manageable_for_user(user)
165
-
166
         current_user_content = Context(CTX.CURRENT_USER).toDict(user)
163
         current_user_content = Context(CTX.CURRENT_USER).toDict(user)
167
-        fake_api = Context(CTX.ADMIN_WORKSPACE).toDict({'current_user': current_user_content})
168
-
169
-        dictified_workspaces = Context(CTX.ADMIN_WORKSPACES).toDict(workspaces, 'workspaces', 'workspace_nb')
170
-        return DictLikeClass(result = dictified_workspaces, fake_api=fake_api)
164
+        fake_api = Context(CTX.ADMIN_WORKSPACE) \
165
+            .toDict(
166
+                {'current_user': current_user_content}
167
+            )
168
+        dictified_workspaces = Context(CTX.ADMIN_WORKSPACES) \
169
+            .toDict(
170
+                workspaces,
171
+                'workspaces',
172
+                'workspace_nb',
173
+            )
174
+        return DictLikeClass(result=dictified_workspaces, fake_api=fake_api)
171
 
175
 
172
     @tg.expose('tracim.templates.admin.workspace_getone')
176
     @tg.expose('tracim.templates.admin.workspace_getone')
173
     def get_one(self, workspace_id):
177
     def get_one(self, workspace_id):