test_typed_endpoint: Inline pointless type variable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-07-11 17:40:07 -07:00 committed by Tim Abbott
parent f04e7fc625
commit c2214b3904
1 changed files with 1 additions and 4 deletions

View File

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