Fri, 26 Aug 2016 20:54:52 +0200 histedit: move constraint verification to the 'action.verify' method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:54:52 +0200] rev 29879
histedit: move constraint verification to the 'action.verify' method Action has a method dedicated to verifying its validity. So we move code related to constrains into that method. This requires a bit more context to the 'verify' method in the same fashion we were passing the 'prev' argument. This is an extra step before we can simplify the constraint handling code further.
Fri, 26 Aug 2016 20:54:32 +0200 histedit: directly use node in 'verifyactions'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:54:32 +0200] rev 29878
histedit: directly use node in 'verifyactions' It does not seem useful to convert to hex: it is an extra step and they are longer strings. So we stick to node for the logic. We only convert to short hex for error when needed. As a nice side effect this remove the explicit constant usage in'[12:]'. This will also help moving the code around later as we just have to access action.node.
Fri, 26 Aug 2016 20:42:18 +0200 histedit: temporarily shorten name of 'constraints' variable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:42:18 +0200] rev 29877
histedit: temporarily shorten name of 'constraints' variable An upcoming changeset will make the line where this variable is used slightly too long. Other later changesets will clean that up further and makes the variable unnecessary, so this is only temporary and it does seems useful to put anything more complicate in place.
Fri, 26 Aug 2016 20:38:37 +0200 histedit: drop the 'nodetoverify' local variable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:38:37 +0200] rev 29876
histedit: drop the 'nodetoverify' local variable We can just use 'action.node'.
Fri, 26 Aug 2016 20:34:58 +0200 histedit: make 'constraints' a class attribute instead of a method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:34:58 +0200] rev 29875
histedit: make 'constraints' a class attribute instead of a method There does not seem to be a reason for this to be a method. So we initialise the class attribute once and for all at creation time and drop the instance method.
Fri, 26 Aug 2016 20:31:33 +0200 histedit: drop the 'nodetoverify' method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:31:33 +0200] rev 29874
histedit: drop the 'nodetoverify' method That method is just returning self.node and is never overridden. We just use the attribute directly instead and get rid of the method. This is the beginning of series to simplify and unify verification of constraints for actions.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip