diff --git a/matchy/state.py b/matchy/state.py index 56fbb1d..fe24411 100644 --- a/matchy/state.py +++ b/matchy/state.py @@ -232,11 +232,12 @@ class _State(): @wraps(func) def inner(self, *args, **kwargs): tmp = _State(self._dict, self._file) - func(tmp, *args, **kwargs) + ret = func(tmp, *args, **kwargs) _SCHEMA.validate(tmp._dict) if tmp._file: _save(tmp._file, tmp._dict) self._dict = tmp._dict + return ret return inner