File tree 2 files changed +4
-4
lines changed 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -168,11 +168,10 @@ def expand_actual_type(self,
168
168
This is supposed to be called for each formal, in order. Call multiple times per
169
169
formal if multiple actuals map to a formal.
170
170
"""
171
- from mypy .subtypes import is_subtype
172
-
173
171
actual_type = get_proper_type (actual_type )
174
172
if actual_kind == nodes .ARG_STAR :
175
173
if isinstance (actual_type , Instance ) and actual_type .args :
174
+ from mypy .subtypes import is_subtype
176
175
if is_subtype (actual_type , self .context .iterable_type ):
177
176
return map_instance_to_supertype (
178
177
actual_type ,
@@ -195,6 +194,7 @@ def expand_actual_type(self,
195
194
else :
196
195
return AnyType (TypeOfAny .from_error )
197
196
elif actual_kind == nodes .ARG_STAR2 :
197
+ from mypy .subtypes import is_subtype
198
198
if isinstance (actual_type , TypedDictType ):
199
199
if formal_kind != nodes .ARG_STAR2 and formal_name in actual_type .items :
200
200
# Lookup type based on keyword argument name.
Original file line number Diff line number Diff line change @@ -209,8 +209,6 @@ class B(A): pass
209
209
b = B().copy() # type: B
210
210
211
211
"""
212
- from mypy .infer import infer_type_arguments
213
-
214
212
if isinstance (method , Overloaded ):
215
213
return cast (F , Overloaded ([bind_self (c , original_type , is_classmethod )
216
214
for c in method .items ]))
@@ -230,6 +228,8 @@ class B(A): pass
230
228
231
229
variables : Sequence [TypeVarLikeType ] = []
232
230
if func .variables and supported_self_type (self_param_type ):
231
+ from mypy .infer import infer_type_arguments
232
+
233
233
if original_type is None :
234
234
# TODO: type check method override (see #7861).
235
235
original_type = erase_to_bound (self_param_type )
You can’t perform that action at this time.
0 commit comments