Format fixes from black
This commit is contained in:
parent
9dbb083ee7
commit
106b50d333
13 changed files with 101 additions and 32 deletions
|
|
@ -49,7 +49,11 @@ class ExampleRenameView(View):
|
|||
# Format our returned object using MicroscopeIdentifySchema
|
||||
schema = MicroscopeIdentifySchema()
|
||||
# Expect a request parameter called "name", which is a string. Pass to argument "args".
|
||||
args = {"name": fields.String(required=True, metadata={"example": "My Example Microscope"})}
|
||||
args = {
|
||||
"name": fields.String(
|
||||
required=True, metadata={"example": "My Example Microscope"}
|
||||
)
|
||||
}
|
||||
|
||||
def post(self, args):
|
||||
# Look for our "name" parameter in the request arguments
|
||||
|
|
|
|||
|
|
@ -53,7 +53,11 @@ class ExampleIdentifyView(PropertyView):
|
|||
# We can use a single schema as the input and output will be formatted identically
|
||||
# Eg. We always expect a "name" string argument, and always return a "name" string attribute
|
||||
class ExampleRenameView(PropertyView):
|
||||
schema = {"name": fields.String(required=True, metadata={"example": "My Example Microscope"})}
|
||||
schema = {
|
||||
"name": fields.String(
|
||||
required=True, metadata={"example": "My Example Microscope"}
|
||||
)
|
||||
}
|
||||
|
||||
def get(self):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -56,7 +56,11 @@ class ExampleIdentifyView(PropertyView):
|
|||
# We can use a single schema as the input and output will be formatted identically
|
||||
# Eg. We always expect a "name" string argument, and always return a "name" string attribute
|
||||
class ExampleRenameView(PropertyView):
|
||||
schema = {"name": fields.String(required=True, metadata={"example": "My Example Microscope"})}
|
||||
schema = {
|
||||
"name": fields.String(
|
||||
required=True, metadata={"example": "My Example Microscope"}
|
||||
)
|
||||
}
|
||||
|
||||
def get(self):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ class TimelapseAPIView(ActionView):
|
|||
required=True, metadata={"example": 5, "description": "Number of images"}
|
||||
),
|
||||
"t_between": fields.Number(
|
||||
load_default=1, metadata={"example": 1, "description": "Time (seconds) between images"}
|
||||
load_default=1,
|
||||
metadata={"example": 1, "description": "Time (seconds) between images"},
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,8 @@ class TimelapseAPIView(ActionView):
|
|||
required=True, metadata={"example": 5, "description": "Number of images"}
|
||||
),
|
||||
"t_between": fields.Number(
|
||||
load_default=1, metadata={"example": 1, "description": "Time (seconds) between images"}
|
||||
load_default=1,
|
||||
metadata={"example": 1, "description": "Time (seconds) between images"},
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue