Skip to content

Commit 5f666ce

Browse files
author
Joel Collins
committed
isort
1 parent 9bcaf3c commit 5f666ce

File tree

15 files changed

+19
-30
lines changed

15 files changed

+19
-30
lines changed

src/labthings/actions/pool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import logging
22
import threading
3-
43
from typing import Dict
54

65
from ..deque import Deque

src/labthings/actions/thread.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
import threading
55
import traceback
66
import uuid
7+
from typing import Any, Callable, Dict, Iterable, Optional
78

89
from flask import copy_current_request_context, has_request_context, request
910
from werkzeug.exceptions import BadRequest
1011

11-
from typing import Optional, Iterable, Dict, Any, Callable
12-
1312
from ..deque import LockableDeque
1413
from ..utilities import TimeoutTracker
1514

src/labthings/apispec/plugins.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import re
22

33
from apispec import BasePlugin # type: ignore
4-
from apispec.ext.marshmallow import MarshmallowPlugin as _MarshmallowPlugin # type: ignore
4+
from apispec.ext.marshmallow import (
5+
MarshmallowPlugin as _MarshmallowPlugin, # type: ignore
6+
)
57
from apispec.ext.marshmallow import OpenAPIConverter
68
from flask.views import http_method_funcs
79

src/labthings/extensions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
import sys
55
import traceback
66
from importlib import util
7+
from typing import Callable, Dict, List, Union
78

89
from flask import url_for
910

10-
from typing import List, Dict, Callable, Union
11-
1211
from .utilities import camel_to_snake, get_docstring, snake_to_spine
1312
from .views.builder import static_from
1413

src/labthings/json/schemas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import re
2+
from typing import Any, Dict, List, Optional, Union
3+
24
import werkzeug.routing
35
from marshmallow import Schema, fields
46

5-
from typing import Dict, List, Union, Optional, Any
6-
77
from .marshmallow_jsonschema import JSONSchema
88

99
PATH_RE = re.compile(r"<(?:[^:<>]+:)?([^<>]+)>")

src/labthings/labthing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import logging
22
import uuid
33
import weakref
4-
5-
from typing import Dict, List, Set, Any, Tuple, Type, Optional
4+
from typing import Any, Dict, List, Optional, Set, Tuple, Type
65

76
from apispec import APISpec # type: ignore
87
from apispec_webframeworks.flask import FlaskPlugin # type: ignore

src/labthings/marshalling/args.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
from functools import update_wrapper, wraps
3+
from typing import Callable, Dict, Union
34

45
from flask import abort, request
56
from marshmallow.exceptions import ValidationError
@@ -8,8 +9,6 @@
89
from ..fields import Field
910
from ..schema import FieldSchema, Schema
1011

11-
from typing import Union, Dict, Callable
12-
1312

1413
class use_body:
1514
"""Gets the request body as a single value and adds it as a positional argument"""

src/labthings/marshalling/marshalling.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from collections.abc import Mapping
22
from functools import wraps
3+
from typing import Callable, Dict, Tuple, Union
34

45
from marshmallow import Schema as _Schema
56
from werkzeug.wrappers import Response as ResponseBase
@@ -8,8 +9,6 @@
89
from ..schema import FieldSchema, Schema
910
from ..utilities import unpack
1011

11-
from typing import Union, Dict, Callable, Tuple
12-
1312

1413
def schema_to_converter(schema: Union[Schema, Field, Dict[str, Union[Field, type]]]):
1514
"""Convert a schema into a converter function,

src/labthings/representations.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
from collections import OrderedDict
22
from typing import Any, Optional
33

4-
from flask import current_app, make_response, Response
4+
from flask import Response, current_app, make_response
55

66
from .find import current_labthing
7-
from .json.encoder import (
8-
LabThingsJSONEncoder,
9-
encode_json,
10-
JSONEncoder as FlaskJSONEncoder,
11-
)
7+
from .json.encoder import JSONEncoder as FlaskJSONEncoder
8+
from .json.encoder import LabThingsJSONEncoder, encode_json
129
from .utilities import PY3
1310

1411
__all__ = ["LabThingsJSONEncoder", "DEFAULT_REPRESENTATIONS", "output_json"]

src/labthings/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import logging
3-
from typing import Optional, Union, Dict, Any
43
from datetime import datetime
4+
from typing import Any, Dict, Optional, Union
55

66
from flask import url_for
77
from marshmallow import Schema, pre_dump, pre_load, validate

0 commit comments

Comments
 (0)