in tools/resource.py [0:0]
def _fetch_attributes(cls, block, attributes):
if isinstance(block, dict):
x = block.get("X")
if x and x.get("Fun") == cls.AST_D_SET_FUNC:
args = x["Args"]
if args and args[0]["Kind"] == "STRING":
attr_name = args[0]["Value"].strip('"')
attributes[attr_name] = {}
else:
for val in block.values():
cls._fetch_attributes(val, attributes)
elif isinstance(block, list):
for val in block:
cls._fetch_attributes(val, attributes)