python: Remove redundant parentheses.

Generated automatically by pyupgrade.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-08-02 14:18:03 -07:00 committed by Tim Abbott
parent 3665deb93a
commit 47f795ae64
2 changed files with 2 additions and 6 deletions

View File

@ -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]

View File

@ -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)