Blackened

This commit is contained in:
jtc42 2019-11-15 16:52:57 +00:00
parent 0907d013cd
commit 76af0891e9
14 changed files with 95 additions and 63 deletions

View file

@ -32,7 +32,7 @@ class AutofocusAPI(MicroscopeViewPlugin):
return jsonify(task.state), 202
else:
abort(503, 'No stage connected. Unable to autofocus.')
abort(503, "No stage connected. Unable to autofocus.")
class FastAutofocusAPI(MicroscopeViewPlugin):
@ -53,4 +53,4 @@ class FastAutofocusAPI(MicroscopeViewPlugin):
return jsonify(task.state), 202
else:
abort(503, 'No stage connected. Unable to autofocus.')
abort(503, "No stage connected. Unable to autofocus.")

View file

@ -147,14 +147,16 @@ class ScanPlugin(MicroscopePlugin):
if "time" not in metadata:
metadata["time"] = generate_basename()
metadata.update({
"scan_parameters": {
"step_size": step_size,
"grid": grid,
"style": style,
"autofocus_dz": autofocus_dz
metadata.update(
{
"scan_parameters": {
"step_size": step_size,
"grid": grid,
"style": style,
"autofocus_dz": autofocus_dz,
}
}
})
)
# Check if autofocus is enabled
if (

View file

@ -154,7 +154,9 @@ class PluginLoader(object):
@property
def state(self):
# DEPRECATED
logging.warning("PluginMount.state is deprecated. Use PluginMount.active instead. State will be removed in a future version.")
logging.warning(
"PluginMount.state is deprecated. Use PluginMount.active instead. State will be removed in a future version."
)
return [m["python_name"] for m in self._plugins]
@property
@ -195,13 +197,15 @@ class PluginLoader(object):
setattr(self, pythonsafe_plugin_name, plugin_object)
# Store the plugin object, and it's properties
self._plugins.append({
"name": plugin_name,
"python_name": pythonsafe_plugin_name,
"plugin": plugin_object,
"routes": [],
"form": None
})
self._plugins.append(
{
"name": plugin_name,
"python_name": pythonsafe_plugin_name,
"plugin": plugin_object,
"routes": [],
"form": None,
}
)
# Grant plugin access to the hardware
plugin_object.microscope = self.parent