MCPcopy Create free account
hub / github.com/httpie/cli / read_raw_config

Function read_raw_config

httpie/config.py:65–77  ·  view source on GitHub ↗
(config_type: str, path: Path)

Source from the content-addressed store, hash-verified

63
64
65def read_raw_config(config_type: str, path: Path) -> Dict[str, Any]:
66 try:
67 with path.open(encoding=UTF8) as f:
68 try:
69 return json.load(f)
70 except ValueError as e:
71 raise ConfigFileError(
72 f'invalid {config_type} file: {e} [{path}]'
73 )
74 except FileNotFoundError:
75 pass
76 except OSError as e:
77 raise ConfigFileError(f'cannot read {config_type} file: {e}')
78
79
80class BaseConfigDict(dict):

Callers 1

loadMethod · 0.85

Calls 2

ConfigFileErrorClass · 0.85
loadMethod · 0.45

Tested by

no test coverage detected