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)
| 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: |
no outgoing calls