• Lucas Ficheux's avatar
    [cragr] Fix DateGuesser for some savings · 4a15ec3d
    Lucas Ficheux authored
    Somme savings Accounts have Transactions with a date without a year,
    we use a DateGuesser to guess that year. The DateGuesser wasn't
    properly handed to the method, that is what this patch fixes.
    
    For DateGuesser to fulfill it's purpose the same instance needs
    to be shared between all Transaction objects, or the default behaviour of
    *Element is to make a copy of the parent's env variable (the dictionnary
    used by the filter Env) so each Transaction would have a new instance
    of DateGuesser.
    
    Here we create a child class of DateGuesser
    with it's __deepcopy__ method overridden so that a call of deepcopy on it will
    return the object itself instead of a copy, this counteracts the
    behaviour of *Element and allows all Transaction objects to share the
    same instance of DateGuesser.
    
    This may break again.
    4a15ec3d
Name
Last commit
Last update
.ci Loading commit data...
contrib Loading commit data...
desktop Loading commit data...
docs Loading commit data...
icons Loading commit data...
man Loading commit data...
modules Loading commit data...
scripts Loading commit data...
tools Loading commit data...
weboob Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
MANIFEST.in Loading commit data...
MANIFEST.in.modules Loading commit data...
README.md Loading commit data...
build.mk Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...