Parse the given generic '.ini' file using legacy IniConfig parser, returning the parsed object. Raise UsageError if the file cannot be parsed.
(path: Path)
| 44 | |
| 45 | |
| 46 | def _parse_ini_config(path: Path) -> iniconfig.IniConfig: |
| 47 | """Parse the given generic '.ini' file using legacy IniConfig parser, returning |
| 48 | the parsed object. |
| 49 | |
| 50 | Raise UsageError if the file cannot be parsed. |
| 51 | """ |
| 52 | try: |
| 53 | return iniconfig.IniConfig(str(path)) |
| 54 | except iniconfig.ParseError as exc: |
| 55 | raise UsageError(str(exc)) from exc |
| 56 | |
| 57 | |
| 58 | def load_config_dict_from_file( |
no test coverage detected