Code formatting

This commit is contained in:
Joel Collins 2020-10-13 15:02:19 +01:00
parent 0234b20ce3
commit 2bfb988460
60 changed files with 392 additions and 396 deletions

View file

@ -1,17 +1,23 @@
from labthings.extensions import BaseExtension
from labthings import find_component, Schema, fields, update_action_progress, current_action
from labthings.views import View, ActionView, PropertyView
from flask import send_file # Used to send images from our server
import io # Used in our capture action
import time # Used in our timelapse function
# Used in our timelapse function
from openflexure_microscope.captures.capture_manager import generate_basename
from flask import send_file # Used to send images from our server
from labthings import (
Schema,
current_action,
fields,
find_component,
update_action_progress,
)
from labthings.extensions import BaseExtension
from labthings.views import ActionView, PropertyView, View
# Used to convert our GUI dictionary into a complete eV extension GUI
from openflexure_microscope.api.utilities.gui import build_gui
# Used in our timelapse function
from openflexure_microscope.captures.capture_manager import generate_basename
## Extension methods
@ -61,6 +67,7 @@ class TimelapseAPI(ActionView):
"""
Take a series of images in a timelapse, running as a background task
"""
args = {
"n_images": fields.Integer(
required=True, example=5, description="Number of images"
@ -75,9 +82,7 @@ class TimelapseAPI(ActionView):
microscope = find_component("org.openflexure.microscope")
# Create and start "timelapse", running in a background task
return timelapse(
microscope, args.get("n_images"), args.get("t_between")
)
return timelapse(microscope, args.get("n_images"), args.get("t_between"))
## Extension GUI (OpenFlexure eV)