MCPcopy Create free account
hub / github.com/GPTScan/GPTScan / process

Function process

src/whitelist_preprocess.py:4–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import re
3
4def process():
5 data:dict = json.load(open("src/whitelist.json"))
6 new_whitelist = {}
7 for key in data.keys():
8 origin_key = key
9 key = re.sub(r"uint\d+", "uint", key)
10 key = re.sub(r"int\d+", "int", key)
11 new_whitelist[key] = data[origin_key]
12
13 json.dump(new_whitelist, open("src/whitelist.json", "w"), indent=4)
14
15{
16 "xxxxxxxxxxxxxxxxxx":{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected