Review: Needs Fixing code review, no test

My main concern is the generation of an invalid regular expression on lines 
30-31 : what if the partner.bank_statement_label contains "special" characters 
such as .[]()^$+*? this could lead to a crash in the query. 

Unless we are really really sure this is not possible, there should be some 
escaping performed on this string before converting it to a regex. I think 
there is a re.escape function available in Python to do just this. 

line 37-38: useless, please remove

line 23: is context['label_memoizer']  used outside this function? If not, this 
could be simply a local variable. 

line 101: get is a method -> use () instead of [] (or if you're sure the key is 
in there, just [] without get)
-- 
https://code.launchpad.net/~camptocamp/banking-addons/improve_lookup/+merge/154730
Your team Banking Addons Team is subscribed to branch 
lp:banking-addons/bank-statement-reconcile-70.

-- 
Mailing list: https://launchpad.net/~banking-addons-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~banking-addons-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to