summaryrefslogtreecommitdiffstats
path: root/test/lib/ansible_test/_internal/http.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2022-08-05 00:51:11 +0200
committerGitHub <noreply@github.com>2022-08-05 00:51:11 +0200
commit5bee66fc5d2514fb2000bb8adffe84de94516964 (patch)
tree9ac339dc51561b993a8179b94b30d4dd1a2ee2b4 /test/lib/ansible_test/_internal/http.py
parentansible-test - Convert more type hints. (#78449) (diff)
downloadansible-5bee66fc5d2514fb2000bb8adffe84de94516964.tar.xz
ansible-5bee66fc5d2514fb2000bb8adffe84de94516964.zip
ansible-test - More type hint updates. (#78455)
* Simple regex replace of multi-line function arg annotations on the first line. * Manually fix up ArgumentParser type annotations. * Manual type hint conversions. * Manual conversion of function type hints. * Remove unnecessary type hints on for statements.
Diffstat (limited to 'test/lib/ansible_test/_internal/http.py')
-rw-r--r--test/lib/ansible_test/_internal/http.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/ansible_test/_internal/http.py b/test/lib/ansible_test/_internal/http.py
index 6802d712e3..1a68a9f0c9 100644
--- a/test/lib/ansible_test/_internal/http.py
+++ b/test/lib/ansible_test/_internal/http.py
@@ -39,11 +39,11 @@ class HttpClient:
"""Perform an HTTP DELETE and return the response."""
return self.request('DELETE', url)
- def put(self, url, data=None, headers=None): # type: (str, t.Optional[str], t.Optional[t.Dict[str, str]]) -> HttpResponse
+ def put(self, url: str, data: t.Optional[str] = None, headers: t.Optional[t.Dict[str, str]] = None) -> HttpResponse:
"""Perform an HTTP PUT and return the response."""
return self.request('PUT', url, data, headers)
- def request(self, method, url, data=None, headers=None): # type: (str, str, t.Optional[str], t.Optional[t.Dict[str, str]]) -> HttpResponse
+ def request(self, method: str, url: str, data: t.Optional[str] = None, headers: t.Optional[t.Dict[str, str]] = None) -> HttpResponse:
"""Perform an HTTP request and return the response."""
cmd = ['curl', '-s', '-S', '-i', '-X', method]