MCPcopy Create free account
hub / github.com/ampproject/amphtml / MessageReferenceForKey

Method MessageReferenceForKey

validator/validator_gen_js.py:173–182  ·  view source on GitHub ↗

A message reference is the variable name used in validator-generated.js. Args: message_key: an instance of MessageKey Returns: The message reference - a string.

(self, message_key)

Source from the content-addressed store, hash-verified

171 return message_id
172
173 def MessageReferenceForKey(self, message_key):
174 """A message reference is the variable name used in validator-generated.js.
175
176 Args:
177 message_key: an instance of MessageKey
178 Returns:
179 The message reference - a string.
180 """
181 return '%s_%d' % (message_key.type_name.lower(),
182 self.MessageIdForKey(message_key))
183
184 def MarkPrinted(self, message_key):
185 """Marks a message as printed.

Callers 3

MaybePrintMessageValueFunction · 0.80
PrintObjectFunction · 0.80

Calls 1

MessageIdForKeyMethod · 0.95

Tested by

no test coverage detected