Skip to content

Commit 9dbab39

Browse files
committed
Enable postponed evaluation of annotations for all test modules
This allows using the latest annotation syntax supported by the type checker regardless of the runtime Python version.
1 parent d8ce2e6 commit 9dbab39

21 files changed

+42
-0
lines changed

tests/fields.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from django.db import models
24

35

tests/managers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from model_utils.managers import SoftDeletableManager, SoftDeletableQuerySet
24

35

tests/test_choices.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from django.test import TestCase
24

35
from model_utils import Choices

tests/test_fields/test_monitor_field.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from datetime import datetime, timezone
24

35
import time_machine

tests/test_fields/test_split_field.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from django.test import TestCase
24

35
from tests.models import Article, SplitFieldAbstractParent

tests/test_fields/test_status_field.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from django.test import TestCase
24

35
from model_utils.fields import StatusField

tests/test_fields/test_urlsafe_token_field.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from unittest.mock import Mock
24

35
from django.db.models import NOT_PROVIDED

tests/test_fields/test_uuid_field.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import uuid
24

35
from django.core.exceptions import ValidationError

tests/test_inheritance_iterable.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from django.db.models import Prefetch
24
from django.test import TestCase
35

tests/test_managers/test_inheritance_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from django.db import models
24
from django.test import TestCase
35

0 commit comments

Comments
 (0)