From: David Montague Date: Wed, 2 Oct 2019 07:12:34 +0000 (-0700) Subject: Update for new mypy X-Git-Tag: 0.12.11~17^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F653%2Fhead;p=thirdparty%2Fstarlette.git Update for new mypy --- 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,