Blackened
This commit is contained in:
parent
ffc944fe99
commit
6df7fe9405
16 changed files with 22 additions and 64 deletions
|
|
@ -11,4 +11,4 @@ try:
|
|||
except Exception as e:
|
||||
logging.error(
|
||||
f"Exception loading builtin extension picamera_autocalibrate: \n{traceback.format_exc()}"
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
from labthings.server.find import find_component
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.view import View
|
||||
from labthings.server.decorators import (
|
||||
ThingAction,
|
||||
ThingProperty,
|
||||
)
|
||||
from labthings.server.decorators import ThingAction, ThingProperty
|
||||
|
||||
from openflexure_microscope.devel import JsonResponse, request, jsonify, taskify, abort
|
||||
from openflexure_microscope.utilities import set_properties
|
||||
|
|
@ -359,7 +356,9 @@ class FastAutofocusAPI(View):
|
|||
abort(503, "No stage connected. Unable to autofocus.")
|
||||
|
||||
|
||||
autofocus_extension_v2 = BaseExtension("org.openflexure.autofocus", version="2.0.0-beta.1")
|
||||
autofocus_extension_v2 = BaseExtension(
|
||||
"org.openflexure.autofocus", version="2.0.0-beta.1"
|
||||
)
|
||||
|
||||
autofocus_extension_v2.add_method(fast_autofocus, "fast_autofocus")
|
||||
autofocus_extension_v2.add_method(autofocus, "autofocus")
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
from labthings.server.view import View
|
||||
from labthings.server.find import find_component
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.decorators import (
|
||||
marshal_task,
|
||||
ThingAction,
|
||||
)
|
||||
from labthings.server.decorators import marshal_task, ThingAction
|
||||
|
||||
from labthings.core.tasks import taskify
|
||||
|
||||
|
|
|
|||
|
|
@ -5,16 +5,9 @@ from typing import Tuple
|
|||
from functools import reduce
|
||||
|
||||
from openflexure_microscope.camera.base import generate_basename
|
||||
from labthings.server.find import (
|
||||
find_component,
|
||||
find_extension,
|
||||
)
|
||||
from labthings.server.find import find_component, find_extension
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.decorators import (
|
||||
marshal_task,
|
||||
use_args,
|
||||
ThingAction,
|
||||
)
|
||||
from labthings.server.decorators import marshal_task, use_args, ThingAction
|
||||
from labthings.server import fields
|
||||
|
||||
from openflexure_microscope.devel import taskify, abort, update_task_progress
|
||||
|
|
|
|||
|
|
@ -17,10 +17,7 @@ import logging
|
|||
from labthings.server.find import find_component
|
||||
from labthings.server.view import View
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.decorators import (
|
||||
ThingAction,
|
||||
ThingProperty,
|
||||
)
|
||||
from labthings.server.decorators import ThingAction, ThingProperty
|
||||
|
||||
|
||||
class ZipManager:
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
from labthings.server.view import View
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.decorators import (
|
||||
ThingAction,
|
||||
ThingProperty,
|
||||
)
|
||||
from labthings.server.decorators import ThingAction, ThingProperty
|
||||
|
||||
from openflexure_microscope.api.utilities.gui import build_gui
|
||||
|
||||
|
|
@ -35,7 +32,7 @@ def dynamic_form():
|
|||
"name": "val_int",
|
||||
"label": "Number value",
|
||||
"minValue": 0,
|
||||
"value": val_int
|
||||
"value": val_int,
|
||||
},
|
||||
{
|
||||
"fieldType": "htmlBlock",
|
||||
|
|
@ -66,7 +63,7 @@ static_form = {
|
|||
"name": "val_int",
|
||||
"label": "Number value",
|
||||
"minValue": 0,
|
||||
"default": 1
|
||||
"default": 1,
|
||||
},
|
||||
{
|
||||
"fieldType": "htmlBlock",
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class ActionsView(View):
|
|||
"self": {
|
||||
"href": current_labthing().url_for(action["view_class"]),
|
||||
"mimetype": "application/json",
|
||||
**description_from_view(action["view_class"])
|
||||
**description_from_view(action["view_class"]),
|
||||
}
|
||||
},
|
||||
"rule": action["rule"],
|
||||
|
|
|
|||
|
|
@ -132,10 +132,7 @@ class RAMCaptureAPI(View):
|
|||
|
||||
stream.seek(0)
|
||||
|
||||
return send_file(
|
||||
io.BytesIO(stream.getbuffer()),
|
||||
mimetype="image/jpeg"
|
||||
)
|
||||
return send_file(io.BytesIO(stream.getbuffer()), mimetype="image/jpeg")
|
||||
|
||||
|
||||
@ThingAction
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
from labthings.server.view import View
|
||||
from labthings.server.find import find_component
|
||||
from labthings.server.decorators import (
|
||||
use_args,
|
||||
marshal_with,
|
||||
doc,
|
||||
ThingAction,
|
||||
)
|
||||
from labthings.server.decorators import use_args, marshal_with, doc, ThingAction
|
||||
from labthings.server import fields
|
||||
|
||||
from openflexure_microscope.utilities import axes_to_array, filter_dict
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ import subprocess
|
|||
import os
|
||||
from sys import platform
|
||||
|
||||
from labthings.server.decorators import (
|
||||
ThingAction,
|
||||
doc_response,
|
||||
)
|
||||
from labthings.server.decorators import ThingAction, doc_response
|
||||
|
||||
|
||||
def is_raspberrypi(raise_on_errors=False):
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ from openflexure_microscope.api.utilities import get_bool, JsonResponse
|
|||
from labthings.server.schema import Schema
|
||||
from labthings.server import fields
|
||||
from labthings.server.view import View
|
||||
from labthings.server.utilities import (
|
||||
description_from_view,
|
||||
)
|
||||
from labthings.server.utilities import description_from_view
|
||||
from labthings.server.decorators import marshal_with, doc_response, Tag, ThingProperty
|
||||
|
||||
from labthings.server.find import find_component
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
|
||||
from labthings.core.utilities import (
|
||||
get_by_path,
|
||||
set_by_path,
|
||||
create_from_path,
|
||||
)
|
||||
from labthings.core.utilities import get_by_path, set_by_path, create_from_path
|
||||
|
||||
from labthings.server.find import find_component
|
||||
from labthings.server.view import View
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
from openflexure_microscope.api.utilities import gen, JsonResponse
|
||||
|
||||
from labthings.core.utilities import (
|
||||
get_by_path,
|
||||
set_by_path,
|
||||
create_from_path,
|
||||
)
|
||||
from labthings.core.utilities import get_by_path, set_by_path, create_from_path
|
||||
|
||||
from labthings.server.find import find_component
|
||||
from labthings.server.view import View
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue