From 47f795ae64599533eaf8f7683a4e821227d85de3 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 2 Aug 2021 14:18:03 -0700 Subject: [PATCH] python: Remove redundant parentheses. Generated automatically by pyupgrade. Signed-off-by: Anders Kaseorg --- zerver/tests/test_docs.py | 2 +- zerver/tests/test_openapi.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index 2af0466958..d21b82a7c9 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -110,7 +110,7 @@ class DocPageTest(ZulipTestCase): def test_api_doc_endpoints(self) -> None: # We extract the set of /api/ endpoints to check by parsing # the /api/ page sidebar for links starting with /api/. - api_page_raw = str((self.client_get("/api/").content)) + api_page_raw = str(self.client_get("/api/").content) ENDPOINT_REGEXP = re.compile(r"href=\"/api/\s*(.*?)\"") endpoint_list_set = set(re.findall(ENDPOINT_REGEXP, api_page_raw)) endpoint_list = [f"/api/{endpoint}" for endpoint in endpoint_list_set] diff --git a/zerver/tests/test_openapi.py b/zerver/tests/test_openapi.py index 12c95130e3..ec86d37407 100644 --- a/zerver/tests/test_openapi.py +++ b/zerver/tests/test_openapi.py @@ -162,11 +162,7 @@ class OpenAPIToolsTest(ZulipTestCase): with self.assertRaises(SchemaError, msg='Opaque object "obj"'): # Checks for opaque objects validate_schema( - ( - test_dict["test3"]["responses"]["200"]["content"]["application/json"][ - "schema" - ] - ) + test_dict["test3"]["responses"]["200"]["content"]["application/json"]["schema"] ) finally: openapi_spec.openapi()["paths"].pop("testing", None)