Fix ruff lint violations

This commit is contained in:
Marcel Peterkau
2026-06-27 10:46:54 +02:00
parent 9944652dfb
commit 3876f8c5ab
12 changed files with 217 additions and 49 deletions
+5 -1
View File
@@ -11,7 +11,11 @@ CONTENT_HASH_FIELD = "content_hash"
def _hashable_copy(data: Any, *, hash_field: str = CONTENT_HASH_FIELD) -> Any:
if isinstance(data, dict):
return {key: _hashable_copy(value, hash_field=hash_field) for key, value in data.items() if key != hash_field}
return {
key: _hashable_copy(value, hash_field=hash_field)
for key, value in data.items()
if key != hash_field
}
if isinstance(data, list):
return [_hashable_copy(item, hash_field=hash_field) for item in data]
return data