Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

python: Remove redundant parentheses.

Anders Kaseorg47f795ae6459
diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py
index 2af0466958f..d21b82a7c99 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 12c95130e3e..ec86d37407c 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)