Skip to content

Commit 01afc3b

Browse files
msullivanilevkivskyi
authored andcommitted
Fix mypyc build (#6731)
PR #6645 introduced a mypyc failure due to the irritating #3603 intersection type issue. Fix it by testing again SYMBOL_FUNCBASE_TYPES instead of FuncBase
1 parent 2a70b81 commit 01afc3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/checkmember.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,8 @@ def type_object_type(info: TypeInfo, builtin_type: Callable[[str], Instance]) ->
777777
return AnyType(TypeOfAny.from_error)
778778

779779
# The two is_valid_constructor() checks ensure this.
780-
assert isinstance(new_method.node, (FuncBase, Decorator))
781-
assert isinstance(init_method.node, (FuncBase, Decorator))
780+
assert isinstance(new_method.node, (SYMBOL_FUNCBASE_TYPES, Decorator))
781+
assert isinstance(init_method.node, (SYMBOL_FUNCBASE_TYPES, Decorator))
782782

783783
init_index = info.mro.index(init_method.node.info)
784784
new_index = info.mro.index(new_method.node.info)

0 commit comments

Comments
 (0)