@@ -591,7 +591,7 @@ def generate_builtin_class_vararg_method_implements_header(builtin_classes):
591591 result .append (f"#define { header_guard } " )
592592 result .append ("" )
593593 for builtin_api in builtin_classes :
594- if not "methods" in builtin_api :
594+ if "methods" not in builtin_api :
595595 continue
596596 class_name = builtin_api ["name" ]
597597 for method in builtin_api ["methods" ]:
@@ -1513,7 +1513,7 @@ def generate_engine_classes_bindings(api, output_dir, use_template_get_node):
15131513 for field in expanded_format .split (";" ):
15141514 field_type = field .strip ().split (" " )[0 ].split ("::" )[0 ]
15151515 if field_type != "" and not is_included_type (field_type ) and not is_pod_type (field_type ):
1516- if not field_type in used_classes :
1516+ if field_type not in used_classes :
15171517 used_classes .append (field_type )
15181518
15191519 result .append ("" )
@@ -2127,7 +2127,7 @@ def generate_global_constant_binds(api, output_dir):
21272127 header .append (f'VARIANT_ENUM_CAST({ enum_def ["name" ]} );' )
21282128
21292129 # Variant::Type is not a global enum, but only one line, it is worth to place in this file instead of creating new file.
2130- header .append (f "VARIANT_ENUM_CAST(godot::Variant::Type);" )
2130+ header .append ("VARIANT_ENUM_CAST(godot::Variant::Type);" )
21312131
21322132 header .append ("" )
21332133
@@ -2583,7 +2583,7 @@ def is_packed_array(type_name):
25832583
25842584def needs_copy_instead_of_move (type_name ):
25852585 """
2586- Those are types which need initialised data or we'll get warning spam so need a copy instead of move.
2586+ Those are types which need initialized data or we'll get warning spam so need a copy instead of move.
25872587 """
25882588 return type_name in [
25892589 "Dictionary" ,
@@ -2691,7 +2691,7 @@ def correct_default_value(value, type_name):
26912691 if value == "" :
26922692 return f"{ type_name } ()"
26932693 if value .startswith ("Array[" ):
2694- return f"{{} }"
2694+ return "{ }"
26952695 if value .startswith ("&" ):
26962696 return value [1 ::]
26972697 if value .startswith ("^" ):
@@ -2707,7 +2707,7 @@ def correct_typed_array(type_name):
27072707
27082708def correct_type (type_name , meta = None , use_alias = True ):
27092709 type_conversion = {"float" : "double" , "int" : "int64_t" , "Nil" : "Variant" }
2710- if meta != None :
2710+ if meta is not None :
27112711 if "int" in meta :
27122712 return f"{ meta } _t"
27132713 elif meta in type_conversion :
@@ -2818,7 +2818,6 @@ def get_operator_id_name(op):
28182818 "or" : "or" ,
28192819 "xor" : "xor" ,
28202820 "not" : "not" ,
2821- "and" : "and" ,
28222821 "in" : "in" ,
28232822 }
28242823 return op_id_map [op ]
0 commit comments