Went on a PEP-8 rampage
This commit is contained in:
parent
f99ad30fb6
commit
0948c9308a
36 changed files with 186 additions and 218 deletions
|
|
@ -4,8 +4,6 @@ from openflexure_microscope.exceptions import TaskDeniedException
|
|||
|
||||
from flask import request, Response, escape, jsonify, abort
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
class IdentifyAPI(MicroscopeViewPlugin):
|
||||
"""
|
||||
|
|
@ -53,6 +51,7 @@ class HelloWorldAPI(MicroscopeViewPlugin):
|
|||
|
||||
return Response(self.microscope.plugin_string)
|
||||
|
||||
|
||||
class LongRunningAPI(MicroscopeViewPlugin):
|
||||
"""
|
||||
An example API plugin that uses a long-running plugin method.
|
||||
|
|
@ -75,6 +74,7 @@ class LongRunningAPI(MicroscopeViewPlugin):
|
|||
except TaskDeniedException:
|
||||
return abort(409)
|
||||
|
||||
|
||||
class SomeExceptionAPI(MicroscopeViewPlugin):
|
||||
"""
|
||||
An example API plugin that uses a long-running but broken plugin method.
|
||||
|
|
@ -92,4 +92,4 @@ class SomeExceptionAPI(MicroscopeViewPlugin):
|
|||
return jsonify(task.state), 202
|
||||
|
||||
except TaskDeniedException:
|
||||
return abort(409)
|
||||
return abort(409)
|
||||
|
|
|
|||
|
|
@ -58,4 +58,4 @@ class Plugin(MicroscopePlugin):
|
|||
|
||||
print("Long-running task finished! Releasing locks.")
|
||||
|
||||
return n_array
|
||||
return n_array
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue