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.

test_typed_endpoint: Inline pointless type variable.

Anders Kaseorgc2214b390463
diff --git a/zerver/tests/test_typed_endpoint.py b/zerver/tests/test_typed_endpoint.py
index a0d9e719ed3..2069f96d0cd 100644
--- a/zerver/tests/test_typed_endpoint.py
+++ b/zerver/tests/test_typed_endpoint.py
@@ -42,10 +42,7 @@ class TestEndpoint(ZulipTestCase):
"""This test is only needed because we don't
have coverage of is_optional in Python 3.11.
"""
- type = cast(Type[Optional[str]], Optional[str])
- self.assertTrue(is_optional(type))
-
- type = str
+ self.assertTrue(is_optional(cast(Type[Optional[str]], Optional[str])))
self.assertFalse(is_optional(str))
def test_coerce(self) -> None: