From c2214b390463fa2080122c22b85394ded5b7ae7d Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 11 Jul 2024 17:40:07 -0700 Subject: [PATCH] test_typed_endpoint: Inline pointless type variable. Signed-off-by: Anders Kaseorg --- zerver/tests/test_typed_endpoint.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zerver/tests/test_typed_endpoint.py b/zerver/tests/test_typed_endpoint.py index a0d9e719ed..2069f96d0c 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: