diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-11-18 13:39:54 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-11-18 13:39:54 -0500 |
commit | 2fe72b977506562811d3b4dce1c138f0a69f7ad4 (patch) | |
tree | 79be2f16e3049b2c7998c62a6ec3ebf34d6c0be0 /test | |
parent | 9141b6c15eac4827f0df2e3f87f331c821d13b5a (diff) | |
download | sqlalchemy-2fe72b977506562811d3b4dce1c138f0a69f7ad4.tar.gz |
use typing.Dict
newer Pythons seem to accept ``dict[Any, Any]`` which is why
this wasn't noticed. Revise fix for #7321 made in
I55656e867876677c5c55143449db371344be8600.
Fixes: #7321
Change-Id: Idc22e15d098543e07853f4532cfd1aaae4dd6404
Diffstat (limited to 'test')
-rw-r--r-- | test/ext/mypy/files/issue_7321.py | 5 | ||||
-rw-r--r-- | test/ext/mypy/files/issue_7321_part2.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/test/ext/mypy/files/issue_7321.py b/test/ext/mypy/files/issue_7321.py index 6a40b9dda..d4cd7f2c4 100644 --- a/test/ext/mypy/files/issue_7321.py +++ b/test/ext/mypy/files/issue_7321.py @@ -1,4 +1,5 @@ from typing import Any +from typing import Dict from sqlalchemy.orm import declarative_base from sqlalchemy.orm import declared_attr @@ -13,9 +14,9 @@ class Foo(Base): return "name" @declared_attr - def __mapper_args__(cls) -> dict[Any, Any]: + def __mapper_args__(cls) -> Dict[Any, Any]: return {} @declared_attr - def __table_args__(cls) -> dict[Any, Any]: + def __table_args__(cls) -> Dict[Any, Any]: return {} diff --git a/test/ext/mypy/files/issue_7321_part2.py b/test/ext/mypy/files/issue_7321_part2.py index f53add1da..4227f2797 100644 --- a/test/ext/mypy/files/issue_7321_part2.py +++ b/test/ext/mypy/files/issue_7321_part2.py @@ -1,4 +1,5 @@ from typing import Any +from typing import Dict from typing import Type from sqlalchemy.orm import declarative_base @@ -16,12 +17,12 @@ class Foo(Base): return "name" @declared_attr - def __mapper_args__(cls: Type["Foo"]) -> dict[Any, Any]: + def __mapper_args__(cls: Type["Foo"]) -> Dict[Any, Any]: return {} # this was a workaround that works if there's no plugin present, make # sure that doesn't crash anything @classmethod @declared_attr - def __table_args__(cls: Type["Foo"]) -> dict[Any, Any]: + def __table_args__(cls: Type["Foo"]) -> Dict[Any, Any]: return {} |