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:
134
134
if not self .selector .is_root_operator (f"{ f .namespace } ::{ f .func .name } " ):
135
135
return None
136
136
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 :
142
138
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 } "
144
140
)
145
141
142
+ if Variant .function not in f .variants and Variant .method in f .variants :
143
+ is_method_variant = True
144
+
146
145
sig : CppSignature | ExecutorchCppSignature = (
147
146
CppSignatureGroup .from_native_function (
148
147
f , method = False , fallback_binding = f .manual_cpp_binding
You can’t perform that action at this time.
0 commit comments