MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __get_key_warn_msg__

Method __get_key_warn_msg__

detrsmpl/data/data_structures/human_data.py:1345–1365  ·  view source on GitHub ↗

Get the warning message when a key fails the check. Args: key (Any): The key with wrong. Returns: str: The warning message.

(cls, key: Any)

Source from the content-addressed store, hash-verified

1343
1344 @classmethod
1345 def __get_key_warn_msg__(cls, key: Any) -> str:
1346 """Get the warning message when a key fails the check.
1347
1348 Args:
1349 key (Any):
1350 The key with wrong.
1351
1352 Returns:
1353 str:
1354 The warning message.
1355 """
1356 class_name = cls.__name__
1357 warn_message = \
1358 f'{key} is absent in' +\
1359 f' {class_name}.SUPPORTED_KEYS.\n'
1360 suggestion_message = \
1361 'Ignore this if you know exactly' +\
1362 ' what you are doing.\n' +\
1363 'Otherwise, Call self.set_key_strict(True)' +\
1364 ' to avoid wrong keys.\n'
1365 return warn_message + suggestion_message
1366
1367 @classmethod
1368 def __get_key_error_msg__(cls, key: Any) -> str:

Callers 1

__check_key__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected