<#9578 refactor: Avoid deserializing state twice> ...
# meltano-repo-activity
g
#9578 refactor: Avoid deserializing state twice Pull request opened by edgarrmondragon ## Description SSIA, we were calling
json.loads
twice on the same input. ## Related Issues NA ## Summary by Sourcery Refactor StateService to optimize JSON handling, standardize error messages, enhance logging, and strengthen type safety. Enhancements: • Reuse parsed JSON state to prevent redundant deserialization in add_state • Standardize exception messages by assigning to variables before raising • Convert f-string logging to parameterized logger calls in add_state • Add type annotations for variables and method parameters in add_state and clear_state • Remove unnecessary noqa comments and add a pragma no cover to improve code clarity meltano/meltano