@@ -97,7 +97,9 @@ def build_type_map(
9797 if mapper .type_to_ir [cdef .info ].is_ext_class :
9898 prepare_class_def (module .path , module .fullname , cdef , errors , mapper , options )
9999 else :
100- prepare_non_ext_class_def (module .path , module .fullname , cdef , errors , mapper , options )
100+ prepare_non_ext_class_def (
101+ module .path , module .fullname , cdef , errors , mapper , options
102+ )
101103
102104 # Prepare implicit attribute accessors as needed if an attribute overrides a property.
103105 for module , cdef in classes :
@@ -164,7 +166,11 @@ def get_module_func_defs(module: MypyFile) -> Iterable[FuncDef]:
164166
165167
166168def prepare_func_def (
167- module_name : str , class_name : str | None , fdef : FuncDef , mapper : Mapper , options : CompilerOptions
169+ module_name : str ,
170+ class_name : str | None ,
171+ fdef : FuncDef ,
172+ mapper : Mapper ,
173+ options : CompilerOptions ,
168174) -> FuncDecl :
169175 kind = (
170176 FUNC_STATICMETHOD
@@ -178,10 +184,17 @@ def prepare_func_def(
178184
179185
180186def prepare_method_def (
181- ir : ClassIR , module_name : str , cdef : ClassDef , mapper : Mapper , node : FuncDef | Decorator , options : CompilerOptions
187+ ir : ClassIR ,
188+ module_name : str ,
189+ cdef : ClassDef ,
190+ mapper : Mapper ,
191+ node : FuncDef | Decorator ,
192+ options : CompilerOptions ,
182193) -> None :
183194 if isinstance (node , FuncDef ):
184- ir .method_decls [node .name ] = prepare_func_def (module_name , cdef .name , node , mapper , options )
195+ ir .method_decls [node .name ] = prepare_func_def (
196+ module_name , cdef .name , node , mapper , options
197+ )
185198 elif isinstance (node , Decorator ):
186199 # TODO: do something about abstract methods here. Currently, they are handled just like
187200 # normal methods.
@@ -238,7 +251,12 @@ def can_subclass_builtin(builtin_base: str) -> bool:
238251
239252
240253def prepare_class_def (
241- path : str , module_name : str , cdef : ClassDef , errors : Errors , mapper : Mapper , options : CompilerOptions
254+ path : str ,
255+ module_name : str ,
256+ cdef : ClassDef ,
257+ errors : Errors ,
258+ mapper : Mapper ,
259+ options : CompilerOptions ,
242260) -> None :
243261 """Populate the interface-level information in a class IR.
244262
@@ -317,7 +335,13 @@ def prepare_class_def(
317335
318336
319337def prepare_methods_and_attributes (
320- cdef : ClassDef , ir : ClassIR , path : str , module_name : str , errors : Errors , mapper : Mapper , options : CompilerOptions
338+ cdef : ClassDef ,
339+ ir : ClassIR ,
340+ path : str ,
341+ module_name : str ,
342+ errors : Errors ,
343+ mapper : Mapper ,
344+ options : CompilerOptions ,
321345) -> None :
322346 """Populate attribute and method declarations."""
323347 info = cdef .info
@@ -464,7 +488,12 @@ def prepare_init_method(cdef: ClassDef, ir: ClassIR, module_name: str, mapper: M
464488
465489
466490def prepare_non_ext_class_def (
467- path : str , module_name : str , cdef : ClassDef , errors : Errors , mapper : Mapper , options : CompilerOptions
491+ path : str ,
492+ module_name : str ,
493+ cdef : ClassDef ,
494+ errors : Errors ,
495+ mapper : Mapper ,
496+ options : CompilerOptions ,
468497) -> None :
469498 ir = mapper .type_to_ir [cdef .info ]
470499 info = cdef .info
0 commit comments