MCPcopy
hub / github.com/tinode/chat / derefVals

Function derefVals

tn-cli/commands.py:78–84  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

76
77# Dereference values, i.e. cmd.val == $usr => cmd.val == <actual value of usr>
78def derefVals(cmd):
79 for key in dir(cmd):
80 if not key.startswith("__") and key != 'varname':
81 val = getattr(cmd, key)
82 if type(val) is str and val.startswith("$"):
83 setattr(cmd, key, getVar(val))
84 return cmd
85
86
87# Constructing individual messages

Callers 1

serialize_cmdFunction · 0.85

Calls 1

getVarFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…