Restructured builtin plugins and docstrings

This commit is contained in:
Joel Collins 2018-12-20 15:44:43 +00:00
parent 9ca821c24c
commit 95a3abde7e
7 changed files with 104 additions and 35 deletions

View file

@ -2,25 +2,25 @@ from flask.views import MethodView
class MicroscopeView(MethodView):
"""
Create a generic MethodView with a globally available
microscope object passed as an argument.
"""
def __init__(self, microscope, **kwargs):
"""
Create a generic MethodView with a globally available
microscope object passed as an argument.
"""
self.microscope = microscope
MethodView.__init__(self, **kwargs)
class MicroscopeViewPlugin(MicroscopeView):
"""
Create a generic MethodView with a globally available
microscope object passed as an argument, and a plugin
reference stored in 'self'. Initially None.
"""
def __init__(self, microscope, plugin=None, **kwargs):
"""
Create a generic MethodView with a globally available
microscope object passed as an argument, and a plugin
reference stored in 'self'. Initially None
"""
self.plugin = plugin
MicroscopeView.__init__(self, microscope=microscope, **kwargs)