File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -1022,7 +1022,7 @@ def add_method(
10221022 )
10231023
10241024
1025- def _get_attrs_init_type (typ : Instance ) -> CallableType | None :
1025+ def _get_attrs_init_type (typ : Instance ) -> CallableType | None | AnyType :
10261026 """
10271027 If `typ` refers to an attrs class, get the type of its initializer method.
10281028 """
@@ -1032,7 +1032,6 @@ def _get_attrs_init_type(typ: Instance) -> CallableType | None:
10321032 init_method = typ .type .get_method ("__init__" ) or typ .type .get_method (ATTRS_INIT_NAME )
10331033 if init_method is None :
10341034 return None
1035-
10361035 # case 1: normal FuncDef
10371036 if isinstance (init_method , FuncDef ) and isinstance (init_method .type , CallableType ):
10381037 return init_method .type
You can’t perform that action at this time.
0 commit comments