Skip to content

Commit

Permalink
Import Annotated from typing_extensions in test_typed_dict.
Browse files Browse the repository at this point in the history
I forgot that Annotated was added in 3.9, not 3.8.
  • Loading branch information
rchen152 committed Dec 20, 2023
1 parent c5237e4 commit adb753d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pytype/tests/test_typed_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,7 @@ class X(TypedDict, total=False):

def test_annotated(self):
self.Check("""
from typing import Annotated
from typing_extensions import NotRequired, TypedDict
from typing_extensions import Annotated, NotRequired, TypedDict
class X(TypedDict):
k1: Annotated[NotRequired[str], 'HELLO']
k2: NotRequired[Annotated[int, 'WORLD']]
Expand Down

0 comments on commit adb753d

Please sign in to comment.