Commit 829c58d3 authored by jtc42's avatar jtc42
Browse files

Blackened

parent 58563302
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -6,7 +6,10 @@ from typing import Tuple
from functools import reduce

from openflexure_microscope.camera.base import generate_basename
from openflexure_microscope.common.flask_labthings.find import find_device, find_extension
from openflexure_microscope.common.flask_labthings.find import (
    find_device,
    find_extension,
)
from openflexure_microscope.common.flask_labthings.extensions import BaseExtension

from openflexure_microscope.devel import (
+2 −1
Original line number Diff line number Diff line
@@ -86,9 +86,11 @@ class ZipManager:
    def zip_from_id(self, session_id):
        return self.session_zips[session_id]["fp"]


# Create a global ZIP manager
default_zip_manager = ZipManager()


class ZipBuilderAPIView(Resource):
    def post(self):

@@ -145,4 +147,3 @@ zip_extension_v2.add_view(ZipListAPIView, "/get")

zip_extension_v2.add_view(ZipBuilderAPIView, "/build")
zip_extension_v2.register_action(ZipBuilderAPIView)
+3 −1
Original line number Diff line number Diff line
@@ -113,7 +113,9 @@ def init_default_extensions(extension_path):
    os.makedirs(os.path.dirname(extension_path), exist_ok=True)

    if not os.path.exists(extension_path):  # If user extensions file doesn't exist
        logging.warning("No extension file found at {}. Creating...".format(extension_path))
        logging.warning(
            "No extension file found at {}. Creating...".format(extension_path)
        )
        create_file(extension_path)

        logging.info("Populating {}...".format(extension_path))
+4 −2
Original line number Diff line number Diff line
@@ -156,6 +156,8 @@ def find_extensions(extension_dir, module_name="extensions"):
    extension_paths = glob.glob(os.path.join(extension_dir, "*.py"))

    for extension_path in extension_paths:
        extensions.extend(find_extensions_in_file(extension_path, module_name=module_name))
        extensions.extend(
            find_extensions_in_file(extension_path, module_name=module_name)
        )

    return extensions
+4 −1
Original line number Diff line number Diff line
@@ -36,7 +36,10 @@ class ExtensionSchema(Schema):
            view_rule = view_data["rule"]
            # Make links dictionary if it doesn't yet exist
            d[view_id] = {
                "href": url_for(ExtensionListResource.endpoint, **view_kwargs, _external=True) + view_rule,
                "href": url_for(
                    ExtensionListResource.endpoint, **view_kwargs, _external=True
                )
                + view_rule,
                **description_from_view(view_cls),
            }

+1 −1

File changed.

Contains only whitespace changes.

Loading