File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -134,15 +134,14 @@ def __call__(self, f: NativeFunction) -> str | None:
134134 if not self .selector .is_root_operator (f"{ f .namespace } ::{ f .func .name } " ):
135135 return None
136136
137- if Variant .function not in f .variants and Variant .method in f .variants :
138- is_method_variant = True
139-
140- # only valid remaining case is only function is in f.variants
141- elif not (Variant .function in f .variants and Variant .method not in f .variants ):
137+ if Variant .function not in f .variants and Variant .method not in f .variants :
142138 raise Exception ( # noqa: TRY002
143- f"Can't handle native function { f . func } with the following variant specification { f .variants } . "
139+ f"Expected one of function or method to be in variants for { f .func . name } "
144140 )
145141
142+ if Variant .function not in f .variants and Variant .method in f .variants :
143+ is_method_variant = True
144+
146145 sig : CppSignature | ExecutorchCppSignature = (
147146 CppSignatureGroup .from_native_function (
148147 f , method = False , fallback_binding = f .manual_cpp_binding
You can’t perform that action at this time.
0 commit comments