class EvalSub(EvalBinaryOp):
def __init__(self, left, right):
f = lambda x, y: Decimal(x - y)
super().__init__(f, left, right, Decimal)
It's in query_compile.py:210. I'd imagine subtraction done via Decimal should instead be modified to handle your case. Tests are
here.
"unsupported operand type(s) for -:" is a python TypeError (not specific to Beancount), which is why you didn't find it in the code. I did "git grep operand" to find the above.
This would be a good addition, BTW. Thanks for taking a stab at it!