Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
msullivan committed Jul 10, 2019
1 parent f291d54 commit 14a92c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypy/checkmember.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def type_object_type(info: TypeInfo, builtin_type: Callable[[str], Instance]) ->
arg_names=["_args", "_kwds"],
ret_type=any_type,
fallback=builtin_type('builtins.function'))
return class_callable(sig, info, fallback, None)
return class_callable(sig, info, fallback, None, is_new=False)

# Otherwise prefer __init__ in a tie. It isn't clear that this
# is the right thing, but __new__ caused problems with
Expand Down Expand Up @@ -884,7 +884,7 @@ def type_object_type_from_function(signature: FunctionLike,

def class_callable(init_type: CallableType, info: TypeInfo, type_type: Instance,
special_sig: Optional[str],
is_new: bool = False) -> CallableType:
is_new: bool) -> CallableType:
"""Create a type object type based on the signature of __init__."""
variables = [] # type: List[TypeVarDef]
variables.extend(info.defn.type_vars)
Expand Down

0 comments on commit 14a92c9

Please sign in to comment.