Skip to content

Commit ecc51e4

Browse files
committed
make CI happy
1 parent b58e8ee commit ecc51e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/checker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ def check_func_def(self, defn: FuncItem, typ: CallableType, name: Optional[str])
947947
if ctx.line < 0:
948948
ctx = typ
949949
self.fail(message_registry.FUNCTION_PARAMETER_CANNOT_BE_COVARIANT, ctx)
950-
elif (is_named_instance(arg_type, 'builtins.list')
950+
elif (isinstance(arg_type, Instance)
951+
and is_named_instance(arg_type, 'builtins.list')
951952
and isinstance(self.iterable_item_type(arg_type), TypeVarType)):
952953
if(self.iterable_item_type(arg_type).variance == COVARIANT):
953954
message = "Cannot use a covariant type variable as a parameter"

0 commit comments

Comments
 (0)