From ef907eba4ab3c14b835988c0370a0ca2b19ff5e1 Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Sat, 29 Jan 2022 15:30:08 +0100 Subject: [PATCH] pylint --- locust_plugins/users/rest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/locust_plugins/users/rest.py b/locust_plugins/users/rest.py index 3a4931f..3f8cdbb 100644 --- a/locust_plugins/users/rest.py +++ b/locust_plugins/users/rest.py @@ -30,6 +30,7 @@ class RestUser(FastHttpUser): def rest(self, method, url, **kwargs) -> Generator[RestResponseContextManager, None, None]: headers = kwargs.pop("headers", {"Content-Type": "application/json", "Accept": "application/json"}) with self.client.request(method, url, catch_response=True, headers=headers, **kwargs) as resp: + resp: RestResponseContextManager resp.js = None if resp.text is None: # round the response time to nearest second to improve error grouping