Skip to content

Commit

Permalink
make CI happy
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYuHui committed Aug 5, 2020
1 parent b58e8ee commit ecc51e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,8 @@ def check_func_def(self, defn: FuncItem, typ: CallableType, name: Optional[str])
if ctx.line < 0:
ctx = typ
self.fail(message_registry.FUNCTION_PARAMETER_CANNOT_BE_COVARIANT, ctx)
elif (is_named_instance(arg_type, 'builtins.list')
elif (isinstance(arg_type, Instance)
and is_named_instance(arg_type, 'builtins.list')
and isinstance(self.iterable_item_type(arg_type), TypeVarType)):
if(self.iterable_item_type(arg_type).variance == COVARIANT):
message = "Cannot use a covariant type variable as a parameter"
Expand Down

0 comments on commit ecc51e4

Please sign in to comment.