I have a problem with this line:
|
if re.match(payee, (entry.payee or entry.narration)): |
I don't think it works the way you intended it. Not a python pro, but in my small test, python just ignores the parantheses.
import re
a = r"^\d"
b = "nope"
c = "1"
print(re.match(a,(b or c)))
This returns None, whereas I expected it to return True
I replaced the or with a + because I want to match both anyway :)
I have a problem with this line:
beancount-categorizer/beancount_categorizer/categorizer.py
Line 21 in 9900eaa
I don't think it works the way you intended it. Not a python pro, but in my small test, python just ignores the parantheses.
This returns
None, whereas I expected it to returnTrueI replaced the
orwith a+because I want to match both anyway :)