diff --git a/src/koyo/project.py b/src/koyo/project.py index 2c30191..eeb6fef 100644 --- a/src/koyo/project.py +++ b/src/koyo/project.py @@ -72,8 +72,8 @@ def cache_dir(self) -> Path: """Return path to cache directory.""" if self._cache_dir is None: self._cache_dir = self.project_dir / "Cache" - self._cache_dir.mkdir(parents=True, exist_ok=True) - return self._cache_dir + self._cache_dir.mkdir(parents=True, exist_ok=True) # type: ignore[union-attr] + return self._cache_dir # type: ignore[return-value] @cache_dir.setter def cache_dir(self, value: PathLike) -> None: @@ -138,7 +138,7 @@ def _cleanup_config(self) -> dict: raise NotImplementedError("Must implement method") @contextmanager - def autosave(self) -> None: + def autosave(self) -> ty.Generator[None, None, None]: """Context manager to automatically save project configuration.""" yield self._export()