Iterate over the sub-configs of the input config, the output `sub_id` uses `cls.sep` to denote substructure. Args: id: id string of the current input config. config: input config to be iterated.
(cls, id: str, config: Any)
| 245 | |
| 246 | @classmethod |
| 247 | def iter_subconfigs(cls, id: str, config: Any) -> Iterator[tuple[str, str, Any]]: |
| 248 | """ |
| 249 | Iterate over the sub-configs of the input config, the output `sub_id` uses `cls.sep` to denote substructure. |
| 250 | |
| 251 | Args: |
| 252 | id: id string of the current input config. |
| 253 | config: input config to be iterated. |
| 254 | """ |
| 255 | for k, v in config.items() if isinstance(config, dict) else enumerate(config): |
| 256 | sub_id = f"{id}{cls.sep}{k}" if id != "" else f"{k}" |
| 257 | yield k, sub_id, v |
| 258 | |
| 259 | @classmethod |
| 260 | def match_refs_pattern(cls, value: str) -> dict[str, int]: |
no outgoing calls
no test coverage detected