Use the last annotation as the reducer

This commit is contained in:
Nuno Campos
2024-05-29 16:47:39 -07:00
parent 4893a24756
commit c3f68a6d7e
+1 -1
View File
@@ -466,7 +466,7 @@ def _get_channel(
def _is_field_binop(typ: Type[Any]) -> Optional[BinaryOperatorAggregate]:
if hasattr(typ, "__metadata__"):
meta = typ.__metadata__
if len(meta) == 1 and callable(meta[0]):
if len(meta) > 1 and callable(meta[-1]):
sig = signature(meta[0])
params = list(sig.parameters.values())
if len(params) == 2 and len(