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

Method __get_key_error_msg__

detrsmpl/data/data_structures/human_data.py:1368–1386  ·  view source on GitHub ↗

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

(cls, key: Any)

Source from the content-addressed store, hash-verified

1366
1367 @classmethod
1368 def __get_key_error_msg__(cls, key: Any) -> str:
1369 """Get the error message when a key fails the check.
1370
1371 Args:
1372 key (Any):
1373 The key with wrong.
1374
1375 Returns:
1376 str:
1377 The error message.
1378 """
1379 class_name = cls.__name__
1380 absent_message = \
1381 f'{key} is absent in' +\
1382 f' {class_name}.SUPPORTED_KEYS.\n'
1383 suggestion_message = \
1384 'Call self.set_key_strict(False)' +\
1385 ' to allow unsupported keys.\n'
1386 return absent_message + suggestion_message
1387
1388 @classmethod
1389 def __get_value_error_msg__(cls) -> str:

Callers 1

__check_key__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected