@@ -425,12 +425,8 @@ def visit_get_attr(self, op: GetAttr) -> None:
425425 fallback_result = self .emitter .temp_name ()
426426 self .declarations .emit_line (f"PyObject *{ fallback_attr } ;" )
427427 self .declarations .emit_line (f"PyObject *{ fallback_result } ;" )
428- self .emit_line (
429- f"if (!(Py_TYPE({ obj } )->tp_flags & CPy_TPFLAGS_MYPYC_COMPILED)) {{"
430- )
431- self .emit_line (
432- f'{ fallback_attr } = PyUnicode_FromString("{ op .attr } ");'
433- )
428+ self .emit_line (f"if (!(Py_TYPE({ obj } )->tp_flags & CPy_TPFLAGS_MYPYC_COMPILED)) {{" )
429+ self .emit_line (f'{ fallback_attr } = PyUnicode_FromString("{ op .attr } ");' )
434430 self .emit_line (
435431 f"{ fallback_result } = PyObject_GenericGetAttr((PyObject *){ obj } , { fallback_attr } );"
436432 )
@@ -641,7 +637,9 @@ def emit_method_call(self, dest: str, op_obj: Value, name: str, op_args: list[Va
641637 obj_args = (
642638 []
643639 if method .decl .kind == FUNC_STATICMETHOD
644- else [f"(PyObject *)Py_TYPE({ obj } )" ] if method .decl .kind == FUNC_CLASSMETHOD else [obj ]
640+ else [f"(PyObject *)Py_TYPE({ obj } )" ]
641+ if method .decl .kind == FUNC_CLASSMETHOD
642+ else [obj ]
645643 )
646644 args = ", " .join (obj_args + [self .reg (arg ) for arg in op_args ])
647645 mtype = native_function_type (method , self .emitter )
@@ -663,9 +661,7 @@ def emit_method_call(self, dest: str, op_obj: Value, name: str, op_args: list[Va
663661 if use_guarded_direct :
664662 lib = self .emitter .get_group_prefix (method .decl )
665663 direct_call = f"{ lib } { NATIVE_PREFIX } { method .cname (self .names )} ({ args } )"
666- self .emit_line (
667- f"if (Py_TYPE({ obj } )->tp_flags & CPy_TPFLAGS_MYPYC_COMPILED) {{"
668- )
664+ self .emit_line (f"if (Py_TYPE({ obj } )->tp_flags & CPy_TPFLAGS_MYPYC_COMPILED) {{" )
669665 self .emit_line (f"{ dest } { direct_call } ;" )
670666 self .emit_line ("} else {" )
671667
0 commit comments