MCPcopy Create free account
hub / github.com/cxapython/catvm / _process

Function _process

selenium/scrapy_splash/utils.py:51–60  ·  view source on GitHub ↗
(value, sha=False)

Source from the content-addressed store, hash-verified

49
50
51def _process(value, sha=False):
52 if isinstance(value, (six.text_type, bytes)):
53 if sha:
54 return hashlib.sha1(to_bytes(value)).hexdigest()
55 return 'h', hash(value)
56 if isinstance(value, dict):
57 return {_process(k, sha=True): _process(v, sha) for k, v in value.items()}
58 if isinstance(value, (list, tuple)):
59 return [_process(v, sha) for v in value]
60 return value
61
62
63def _fast_hash(value):

Callers 2

_fast_hashFunction · 0.85
json_based_hashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected