mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-09-11 21:54:18 +02:00
Fix ruff lint violations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user