Skip to content

Commit 001d6bb

Browse files
committed
Format fixes
1 parent 9b51698 commit 001d6bb

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

src/labthings/apispec/utilities.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ def field2property(field):
1616

1717

1818
def ensure_schema(
19-
schema: Union[fields.Field, Type[fields.Field], Schema, Type[Schema], Dict[str, Union[fields.Field, type]]],
19+
schema: Union[
20+
fields.Field,
21+
Type[fields.Field],
22+
Schema,
23+
Type[Schema],
24+
Dict[str, Union[fields.Field, type]],
25+
],
2026
name: str = "GeneratedFromDict",
2127
) -> Union[dict, Schema]:
2228
"""Create a Schema object, or OpenAPI dictionary, given a Field, Schema, or Dict.

tests/test_marshalling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
from labthings import fields
12
from labthings.marshalling import marshalling as ms
23
from labthings.schema import Schema
3-
from labthings import fields
44

55

66
def test_schema_to_converter_schema():

tests/test_marshalling_args.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from labthings import views, fields
2-
from labthings.schema import Schema
1+
from labthings import fields, views
32
from labthings.marshalling.args import use_args, use_body
3+
from labthings.schema import Schema
44

55

66
def test_use_body_string(app, client):

tests/test_openapi.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
done in test_td.py.
66
"""
77

8+
import apispec
89
import pytest
10+
import yaml
11+
from apispec.ext.marshmallow import MarshmallowPlugin
12+
from apispec.utils import validate_spec
13+
from marshmallow import validate
914

1015
from labthings import fields, schema
1116
from labthings.actions.thread import ActionThread
17+
from labthings.apispec import utilities
1218
from labthings.extensions import BaseExtension
1319
from labthings.schema import LogRecordSchema, Schema
14-
from labthings.views import ActionView, PropertyView, EventView
15-
from marshmallow import validate
16-
import apispec
17-
from apispec.utils import validate_spec
18-
from apispec.ext.marshmallow import MarshmallowPlugin
19-
from labthings.apispec import utilities
20-
import yaml
20+
from labthings.views import ActionView, EventView, PropertyView
2121

2222

2323
def test_openapi(thing):

tests/test_td.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import pytest
2+
from apispec.utils import validate_spec
23

34
from labthings import fields
45
from labthings.views import ActionView, PropertyView, View, op
5-
from apispec.utils import validate_spec
66

77

88
@pytest.fixture

0 commit comments

Comments
 (0)