Skip to content

Commit

Permalink
Use <3.9 compatible annotations for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobronium committed Aug 5, 2022
1 parent 4da7966 commit 5f226d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/mypy/modules/fail1.py
Expand Up @@ -14,7 +14,7 @@ class Model(BaseModel):
last_name: NoneStr = None
signup_ts: Optional[datetime] = None
list_of_ints: List[int]
json_list_of_ints: Json[list[int]]
json_list_of_ints: Json[List[int]]


m = Model(age=42, list_of_ints=[1, '2', b'3'])
Expand Down
4 changes: 2 additions & 2 deletions tests/mypy/modules/success.py
Expand Up @@ -230,8 +230,8 @@ class PydanticTypes(BaseModel):
my_dir_path: DirectoryPath = Path('.')
my_dir_path_str: DirectoryPath = '.' # type: ignore
# Json
my_json: Json[dict[str, str]] = '{"hello": "world"}' # type: ignore
my_json_list: Json[list[str]] = '["hello", "world"]' # type: ignore
my_json: Json[Dict[str, str]] = '{"hello": "world"}' # type: ignore
my_json_list: Json[List[str]] = '["hello", "world"]' # type: ignore
# Date
my_past_date: PastDate = date.today() - timedelta(1)
my_future_date: FutureDate = date.today() + timedelta(1)
Expand Down

0 comments on commit 5f226d2

Please sign in to comment.