From 5abdc2e4fb62efe740c8ab00e9c9ec0f70d936eb Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 18 Feb 2019 13:14:53 +0000 Subject: [PATCH] Fix imports --- starlette/responses.py | 8 +++----- tests/test_responses.py | 1 - tests/test_templates.py | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/starlette/responses.py b/starlette/responses.py index 7ed28225..4032abd3 100644 --- a/starlette/responses.py +++ b/starlette/responses.py @@ -10,6 +10,9 @@ from urllib.parse import quote_plus from starlette.background import BackgroundTask from starlette.datastructures import URL, MutableHeaders +# For compat with earlier versions. +# We'll drop this with the next median release. +from starlette.templating import _TemplateResponse as TemplateResponse from starlette.types import Receive, Send try: @@ -281,8 +284,3 @@ class FileResponse(Response): ) if self.background is not None: await self.background() - - -# For compat with earlier versions. -# We'll drop this with the next median release. -from starlette.templating import _TemplateResponse as TemplateResponse diff --git a/tests/test_responses.py b/tests/test_responses.py index e2201425..84ff588a 100644 --- a/tests/test_responses.py +++ b/tests/test_responses.py @@ -11,7 +11,6 @@ from starlette.responses import ( RedirectResponse, Response, StreamingResponse, - TemplateResponse, UJSONResponse, ) from starlette.testclient import TestClient diff --git a/tests/test_templates.py b/tests/test_templates.py index f8eb6842..963624a7 100644 --- a/tests/test_templates.py +++ b/tests/test_templates.py @@ -1,4 +1,5 @@ import os + import pytest from starlette.applications import Starlette