When reset_last_change() is called on a Function or FunctionHeader, it iterates over their arguments', stackvars' and header's own reset_last_change(), but it never actually apply the useful modification (self.last_change = None) to themselves.
Function.reset_last_change and FunctionHeader.reset_last_change should also call super().reset_last_change():
-
In Function:
|
def reset_last_change(self): |
|
if self.header: |
|
self.header.reset_last_change() |
|
|
|
if self.stack_vars: |
|
for sv in self.stack_vars.values(): |
|
sv.reset_last_change() |
|
|
-
In FunctionHeader:
|
def reset_last_change(self): |
|
if self.args: |
|
for arg in self.args.values(): |
|
arg.reset_last_change() |
|
|
Actually the comment in their respective super-class, Artifact tells us this was intended, but forgotten:
|
def reset_last_change(self): |
|
""" |
|
Resets the change time of the Artifact. |
|
In subclasses, this should also reset all artifacts with nested artifacts |
|
""" |
|
self.last_change = None |
|
|
Cheers
When
reset_last_change()is called on aFunctionorFunctionHeader, it iterates over their arguments', stackvars' and header's ownreset_last_change(), but it never actually apply the useful modification (self.last_change = None) to themselves.Function.reset_last_changeandFunctionHeader.reset_last_changeshould also callsuper().reset_last_change():In
Function:declib/declib/artifacts/func.py
Lines 352 to 359 in cd38076
In
FunctionHeader:declib/declib/artifacts/func.py
Lines 128 to 132 in cd38076
Actually the comment in their respective super-class,
Artifacttells us this was intended, but forgotten:declib/declib/artifacts/artifact.py
Lines 277 to 283 in cd38076
Cheers