From 8193cb6de662d8e7da70a89aa6ef37c12235ed73 Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Mon, 5 Jan 2026 09:09:02 -0500 Subject: [PATCH] feature: created cases for non-YAML parsing, tho not yet implemented --- confctx.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/confctx.py b/confctx.py index 5da471a..bf4ebbe 100644 --- a/confctx.py +++ b/confctx.py @@ -23,7 +23,7 @@ class Config: filepath = Path(parent_dir) / filepath filename: str = filepath.stem - self.parse_method = "yml" + self.parse_method = "YML" if "." in filename: filename_arr = filename.split(".") basename: str = filename_arr[0] @@ -45,7 +45,13 @@ class Config: self.file = open(str(self.filepath), self.mode) model = self.file.read() - self.model = yams.load(model) + + if self.parse_method == "INI": + raise NotImplementedError + elif self.parse_method == "TOML": + raise NotImplementedError + else: + self.model = yams.load(model) if self.scope == AnsibleScopes.GROUPVARS.name or self.scope == AnsibleScopes.HOSTVARS.name: api_key: str = model["vps_service"]["api_key"]