diff --git a/ormar/relations/querysetproxy.py b/ormar/relations/querysetproxy.py index ec3f9fd..255839e 100644 --- a/ormar/relations/querysetproxy.py +++ b/ormar/relations/querysetproxy.py @@ -9,9 +9,9 @@ from typing import ( # noqa: I100, I201 Sequence, Set, TYPE_CHECKING, + Tuple, Type, TypeVar, - Tuple, Union, cast, ) diff --git a/tests/test_model_definition/test_save_status.py b/tests/test_model_definition/test_save_status.py index 0bbda39..b104072 100644 --- a/tests/test_model_definition/test_save_status.py +++ b/tests/test_model_definition/test_save_status.py @@ -195,11 +195,15 @@ async def test_queryset_methods(): comps = await Company.objects.all() assert [comp.saved for comp in comps] - comp2, created = await Company.objects.get_or_create(name="Banzai_new", founded=2001) + comp2, created = await Company.objects.get_or_create( + name="Banzai_new", founded=2001 + ) assert comp2.saved assert created is True - comp3, created = await Company.objects.get_or_create(name="Banzai", founded=1988) + comp3, created = await Company.objects.get_or_create( + name="Banzai", founded=1988 + ) assert comp3.saved assert comp3.pk == comp.pk assert created is False diff --git a/tests/test_queries/test_queryproxy_on_m2m_models.py b/tests/test_queries/test_queryproxy_on_m2m_models.py index 1fe8fc5..b9ac07e 100644 --- a/tests/test_queries/test_queryproxy_on_m2m_models.py +++ b/tests/test_queries/test_queryproxy_on_m2m_models.py @@ -107,7 +107,9 @@ async def test_queryset_methods(): assert len(post.categories) == 1 assert created is False - category, created = await post.categories.get_or_create(name="Breaking News") + category, created = await post.categories.get_or_create( + name="Breaking News" + ) assert category != breaking assert category.pk is not None assert len(post.categories) == 2 diff --git a/tests/test_queries/test_queryset_level_methods.py b/tests/test_queries/test_queryset_level_methods.py index ee308dc..497b40d 100644 --- a/tests/test_queries/test_queryset_level_methods.py +++ b/tests/test_queries/test_queryset_level_methods.py @@ -209,7 +209,7 @@ async def test_get_or_create_with_defaults(): assert book2.author == "Mojix" assert book2.genre == "Historic" assert await Book.objects.count() == 1 - + @pytest.mark.asyncio async def test_update_or_create():