aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config_file/parsers/toml_parser.py3
-rw-r--r--config_file/parsers/yaml_parser.py10
2 files changed, 7 insertions, 6 deletions
diff --git a/config_file/parsers/toml_parser.py b/config_file/parsers/toml_parser.py
index 58e20b9..1c7f8a7 100644
--- a/config_file/parsers/toml_parser.py
+++ b/config_file/parsers/toml_parser.py
@@ -9,11 +9,12 @@ from config_file.exceptions import MissingDependencyError
from .base_parser import BaseParser
+
class TomlParser(BaseParser):
def __init__(self, file_contents: str):
if not TOML_AVAILABLE:
raise MissingDependencyError(
- "It doesn't appear `toml` is installed, but a toml "
+ "It doesn't appear `tomlkit` is installed, but a toml "
"file was attempted to be used. Install the `toml` "
"extra first with `pip install config-file[toml]`."
)
diff --git a/config_file/parsers/yaml_parser.py b/config_file/parsers/yaml_parser.py
index 1937e17..babe873 100644
--- a/config_file/parsers/yaml_parser.py
+++ b/config_file/parsers/yaml_parser.py
@@ -14,12 +14,12 @@ class YamlParser(BaseParser):
def __init__(self, file_contents: str):
if not YAML_AVAILABLE:
raise MissingDependencyError(
- "It doesn't appear `PyYaml` is installed, but a yaml "
- "file was attempted to be used. Install the `toml` "
- "extra first with `pip install config-file[toml]`."
+ "It doesn't appear `ruamel.yaml` is installed, but a yaml "
+ "file was attempted to be used. Install the `yaml` "
+ "extra first with `pip install config-file[yaml]`."
)
-
- yaml = YAML(typ='safe')
+
+ yaml = YAML(typ="safe")
yaml.loads = round_trip_load
yaml.dumps = round_trip_dump