File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 7
7
Optional ,
8
8
Type ,
9
9
TypeVar ,
10
+ Union ,
10
11
cast ,
11
12
)
12
13
@@ -115,9 +116,10 @@ def models_from_cursor(
115
116
)
116
117
117
118
for index , related_field_name in enumerate (related_fields ):
118
- related_model = model ._meta .get_field (
119
- related_field_name
120
- ).related_model
119
+ related_model = cast (
120
+ Union [Type [Model ], None ],
121
+ model ._meta .get_field (related_field_name ).related_model ,
122
+ )
121
123
if not related_model :
122
124
continue
123
125
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def run(self):
97
97
"docformatter==1.4" ,
98
98
"mypy==1.2.0; python_version > '3.6'" ,
99
99
"mypy==0.971; python_version <= '3.6'" ,
100
- "django-stubs==1.16.0 ; python_version > '3.6'" ,
100
+ "django-stubs==4.2.7 ; python_version > '3.6'" ,
101
101
"django-stubs==1.9.0; python_version <= '3.6'" ,
102
102
"typing-extensions==4.5.0; python_version > '3.6'" ,
103
103
"typing-extensions==4.1.0; python_version <= '3.6'" ,
You can’t perform that action at this time.
0 commit comments