MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / is_expression

Method is_expression

monai/bundle/config_item.py:387–396  ·  view source on GitHub ↗

Check whether the config is an executable expression string. Currently, a string starts with ``"$"`` character is interpreted as an expression. Args: config: input config content to check.

(cls, config: dict | list | str)

Source from the content-addressed store, hash-verified

385
386 @classmethod
387 def is_expression(cls, config: dict | list | str) -> bool:
388 """
389 Check whether the config is an executable expression string.
390 Currently, a string starts with ``"$"`` character is interpreted as an expression.
391
392 Args:
393 config: input config content to check.
394
395 """
396 return isinstance(config, str) and config.startswith(cls.prefix)
397
398 @classmethod
399 def is_import_statement(cls, config: dict | list | str) -> bool:

Callers 8

match_refs_patternMethod · 0.80
update_refs_patternMethod · 0.80
find_refs_in_configMethod · 0.80
evaluateMethod · 0.80
is_import_statementMethod · 0.80
_do_parseMethod · 0.80
test_resolveMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_resolveMethod · 0.64