Skip to content

Commit c0274bf

Browse files
nkrishnaswamiYuriiMotov
authored andcommitted
Update tests/test_attribute_keyed_dict.py
Co-authored-by: Motov Yurii <[email protected]>
1 parent 6450d22 commit c0274bf

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test_attribute_keyed_dict.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,8 @@ class Parent(SQLModel, table=True):
4949
assert parent.children_by_color[Color.Blue].value == 2
5050

5151

52-
# typing.Dict throws if it receives the wrong number of type arguments, but dict
53-
# (3.10+) does not; and Pydantic v1 fails to process models with dicts with no
54-
# type arguments.
55-
@needs_pydanticv2
56-
@needs_py310
52+
@needs_pydanticv2 # Pydantic V1 doesn't support `dict` with number of arguments < 2
53+
@needs_py39 # Generic `dict` requires Python 3.9+
5754
def test_dict_relationship_throws_on_missing_annotation_arg(clear_sqlmodel):
5855
class Color(str, Enum):
5956
Orange = "Orange"

0 commit comments

Comments
 (0)