File tree 2 files changed +2
-3
lines changed
django-stubs/contrib/postgres/fields 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ from typing import Any
2
2
3
3
from django .db import models
4
4
5
- from psycopg2 .extras import DateRange , DateTimeTZRange , NumericRange
5
+ from psycopg2 .extras import DateRange , DateTimeTZRange , NumericRange # type: ignore
6
6
7
7
class RangeField (models .Field ):
8
8
empty_strings_allowed : bool = ...
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ reveal_type(user.text) # E: Revealed type is 'builtins.str'
40
40
[CASE test_model_field_classes_from_exciting_locations]
41
41
from django.db import models
42
42
from django.contrib.postgres import fields as pg_fields
43
- from psycopg2.extras import DateTimeTZRange
44
43
from decimal import Decimal
45
44
46
45
class Booking(models.Model):
@@ -50,7 +49,7 @@ class Booking(models.Model):
50
49
51
50
booking = Booking()
52
51
reveal_type(booking.id) # E: Revealed type is 'builtins.int'
53
- reveal_type(booking.time_range) # E: Revealed type is 'DateTimeTZRange '
52
+ reveal_type(booking.time_range) # E: Revealed type is 'Any '
54
53
reveal_type(booking.some_decimal) # E: Revealed type is 'Decimal'
55
54
56
55
[CASE test_add_id_field_if_no_primary_key_defined]
You can’t perform that action at this time.
0 commit comments