diff --git a/CHANGELOG.md b/CHANGELOG.md index 61edd1d..c44e462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [1.5.5] + +### Fixed + +- using `Path` only + ## [1.5.4] ### Fixed diff --git a/kaizo/parser.py b/kaizo/parser.py index 5b524b5..273ee61 100644 --- a/kaizo/parser.py +++ b/kaizo/parser.py @@ -1,4 +1,3 @@ -import os from pathlib import Path from types import ModuleType from typing import Any @@ -37,14 +36,14 @@ def __init__( *, isolated: bool = True, ) -> None: - root, _ = os.path.split(config_path) + config_path = Path(config_path) - root = Path(root) + root = config_path.parent self.storage = {} self.kwargs = DictEntry.from_raw(raw_data=kwargs, resolve=False) - with Path.open(config_path) as file: + with config_path.open() as file: self.config = yaml.safe_load(file) self.isolated = self.config.pop("isolated", isolated) diff --git a/pyproject.toml b/pyproject.toml index 555adb8..a73cca8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kaizo" -version = "1.5.4" +version = "1.5.5" description = "declarative YAML-based configuration parser" authors = [{ name = "Mohammad Ghazanfari", email = "mgh.5225@gmail.com" }] readme = "README.md"