diff --git a/rolo/asgi.py b/rolo/asgi.py index 827da58..dadbf28 100644 --- a/rolo/asgi.py +++ b/rolo/asgi.py @@ -1,4 +1,5 @@ """This module contains code to make ASGI play nice with WSGI.""" + import asyncio import io import logging diff --git a/rolo/dispatcher.py b/rolo/dispatcher.py index 4e816a3..39f9e1c 100644 --- a/rolo/dispatcher.py +++ b/rolo/dispatcher.py @@ -1,6 +1,7 @@ """ DEPRECATED: use ``from rolo.routing import handler_dispatcher`` instead """ + from .routing.handler import ResultValue, handler_dispatcher __all__ = [ diff --git a/rolo/gateway/asgi.py b/rolo/gateway/asgi.py index 9cb1a30..9baf6e4 100644 --- a/rolo/gateway/asgi.py +++ b/rolo/gateway/asgi.py @@ -1,4 +1,5 @@ """This module provides adapter code to expose a ``Gateway`` as an ASGI compatible application.""" + import asyncio import concurrent.futures.thread from asyncio import AbstractEventLoop diff --git a/rolo/gateway/chain.py b/rolo/gateway/chain.py index c36cb1f..580ca9b 100644 --- a/rolo/gateway/chain.py +++ b/rolo/gateway/chain.py @@ -1,6 +1,7 @@ """ The core concepts of the HandlerChain. """ + from __future__ import annotations import logging diff --git a/rolo/gateway/handlers.py b/rolo/gateway/handlers.py index f6bb4de..ecce519 100644 --- a/rolo/gateway/handlers.py +++ b/rolo/gateway/handlers.py @@ -1,4 +1,5 @@ """Several gateway handlers""" + import typing as t from werkzeug.datastructures import Headers, MultiDict diff --git a/rolo/gateway/wsgi.py b/rolo/gateway/wsgi.py index d88d39f..f4e12d8 100644 --- a/rolo/gateway/wsgi.py +++ b/rolo/gateway/wsgi.py @@ -1,4 +1,5 @@ """This module contains adapter code that exposes a ``Gateway`` as a WSGI application.""" + import typing as t from werkzeug.datastructures import Headers, MultiDict diff --git a/rolo/resource.py b/rolo/resource.py index a5cf578..c30ef1b 100644 --- a/rolo/resource.py +++ b/rolo/resource.py @@ -1,6 +1,7 @@ """ DEPRECATED: use ``from rolo.routing import Resource, resource`` instead """ + from .routing.resource import Resource, resource __all__ = [ diff --git a/rolo/routing/resource.py b/rolo/routing/resource.py index 29e2f57..84bc050 100644 --- a/rolo/routing/resource.py +++ b/rolo/routing/resource.py @@ -13,6 +13,7 @@ def on_post(self, request: Request): router = Router(dispatcher=resource_dispatcher()) router.add(Resource("/foo", Foo()) """ + from typing import Any, Iterable, Optional, Type from werkzeug.routing import Map, Rule, RuleFactory diff --git a/rolo/serving/twisted.py b/rolo/serving/twisted.py index fae8987..e31425f 100644 --- a/rolo/serving/twisted.py +++ b/rolo/serving/twisted.py @@ -1,6 +1,7 @@ """ Bindings to serve rolo through Twisted. """ + import logging import time import typing as t diff --git a/rolo/testing/pytest.py b/rolo/testing/pytest.py index 5ca2f76..c7d3424 100644 --- a/rolo/testing/pytest.py +++ b/rolo/testing/pytest.py @@ -1,4 +1,5 @@ """rolo pytest plugin used both for internal testing and as testing library.""" + import asyncio import dataclasses import socket diff --git a/rolo/websocket/adapter.py b/rolo/websocket/adapter.py index 1a5314a..f8f780f 100644 --- a/rolo/websocket/adapter.py +++ b/rolo/websocket/adapter.py @@ -1,5 +1,6 @@ """Adapter API between high-level rolo.websocket.request and an underlying IO frameworks like ASGI or twisted.""" + import dataclasses import typing as t diff --git a/rolo/websocket/websocket.py b/rolo/websocket/websocket.py index db72863..1d4518d 100644 --- a/rolo/websocket/websocket.py +++ b/rolo/websocket/websocket.py @@ -1,4 +1,5 @@ """TODO: remove with release (just keeping this so localstack doesn't blow up)""" + from .adapter import WebSocketEnvironment, WebSocketListener from .errors import WebSocketDisconnectedError, WebSocketError, WebSocketProtocolError from .request import WebSocket, WebSocketRequest