Skip to content

Commit 166776b

Browse files
committed
Fix: return Anytype on _get_expanded_attr_types
1 parent 22c8dfd commit 166776b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/plugins/attrs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ def _get_expanded_attr_types(
10941094
_fail_not_attrs_class(ctx, display_typ, parent_typ)
10951095
return None
10961096
if isinstance(init_func, AnyType):
1097-
return AnyType(TypeOfAny.special_form)
1097+
return None
10981098
init_func = expand_type_by_instance(init_func, typ)
10991099
# [1:] to skip the self argument of AttrClass.__init__
11001100
field_names = cast(list[str], init_func.arg_names[1:])

0 commit comments

Comments
 (0)