shep

Multi-state key stores using bit masks for python3
git clone git://git.defalsify.org/shep.git
Log | Files | Refs | LICENSE

commit b15b4123a8d1d93a48aef3488c595f2f1ebb65d2
parent 6d10b8df7676c0dd4dbccd6c13ce4ed7acf299c3
Author: lash <dev@holbrook.no>
Date:   Sun, 20 Aug 2023 13:42:57 +0100

Skip counter advance when adding composite state

Diffstat:
MCHANGELOG | 5+++++
Msetup.cfg | 2+-
Mshep/state.py | 6++----
3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,8 @@ +- 0.3.6 + * Remove logging import in state base class + * Skip advance state counter when adding a composite key +- 0.3.5 + * Upgrade project state to beta - 0.3.4 * Fix persisted store bug deleting item whose value is same after set() - 0.3.3 diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = shep -version = 0.3.5 +version = 0.3.6 description = Multi-state key stores using bit masks author = Louis Holbrook author_email = dev@holbrook.no diff --git a/shep/state.py b/shep/state.py @@ -1,8 +1,6 @@ # standard imports import re import datetime -import logging -logg = logging.getLogger() # local imports from shep.error import ( @@ -149,7 +147,8 @@ class State: def __set(self, k, v): setattr(self, k, v) self.__reverse[v] = k - self.__c += 1 + if k[0] != '_': + self.__c += 1 # check validity of key to register state for @@ -483,7 +482,6 @@ class State: self.register_modify(key) - logg.debug('move {} {} {}'.format(key, from_state, to_state)) return to_state