forked from cleveragents/cleveragents-core
fix(lint): resolve linting errors
This commit is contained in:
@@ -265,7 +265,9 @@ class PersistentSessionService(SessionService):
|
||||
raise SessionImportError("Missing checksum in import data")
|
||||
|
||||
# Recompute checksum
|
||||
data_without_checksum = "sha256:" + {k: v for k, v in data.items() if k != "checksum"}
|
||||
data_without_checksum = "sha256:" + {
|
||||
k: v for k, v in data.items() if k != "checksum"
|
||||
}
|
||||
canonical = json.dumps(data_without_checksum, sort_keys=True, default=str)
|
||||
expected_checksum = "sha256:" + hashlib.sha256(canonical.encode()).hexdigest()
|
||||
if checksum != expected_checksum:
|
||||
|
||||
@@ -246,7 +246,7 @@ def add(
|
||||
# If the YAML has a top-level 'tool:' key, extract its contents
|
||||
if isinstance(config_dict, dict) and 'tool' in config_dict:
|
||||
config_dict = config_dict['tool']
|
||||
|
||||
|
||||
# Ignore 'cleveragents:' version header if present
|
||||
if isinstance(config_dict, dict) and 'cleveragents' in config_dict:
|
||||
del config_dict['cleveragents']
|
||||
|
||||
Reference in New Issue
Block a user