From b2551a3d1787157c7ee53861223940f5eb588bd9 Mon Sep 17 00:00:00 2001 From: David Montague Date: Wed, 2 Oct 2019 00:12:34 -0700 Subject: [PATCH] Update for new mypy --- starlette/datastructures.py | 2 +- starlette/testclient.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starlette/datastructures.py b/starlette/datastructures.py index bc5ae36f..087a27f5 100644 --- a/starlette/datastructures.py +++ b/starlette/datastructures.py @@ -161,7 +161,7 @@ class URLPath(str): Used by the routing to return `url_path_for` matches. """ - def __new__(cls, path: str, protocol: str = "", host: str = "") -> str: + def __new__(cls, path: str, protocol: str = "", host: str = "") -> "URLPath": assert protocol in ("http", "websocket", "") return str.__new__(cls, path) # type: ignore diff --git a/starlette/testclient.py b/starlette/testclient.py index d1b8bff9..5ec52bec 100644 --- a/starlette/testclient.py +++ b/starlette/testclient.py @@ -382,7 +382,7 @@ class TestClient(requests.Session): self.app = asgi_app self.base_url = base_url - def request( + def request( # type: ignore self, method: str, url: str, -- 2.47.2