diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index aba051d..7e3b690 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [Unreleased] + +### Deprecated + +- utility class for existing directories +- utility class for existing files + ## [0.1.0] - 2026-09-01 ### Added diff --git a/src/jcloud_docsgen/utils.py b/src/jcloud_docsgen/utils.py index fcda1cc..29c8e98 100644 --- a/src/jcloud_docsgen/utils.py +++ b/src/jcloud_docsgen/utils.py @@ -22,6 +22,12 @@ import errno from typing import Union import types +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + +@deprecated('Use pathlib.Path instead.') class ExistingDirectory(pathlib.Path): ''' pathlib.Path subclass that is a directory. @@ -37,6 +43,7 @@ class ExistingDirectory(pathlib.Path): raise NotADirectoryError(errno.ENOTDIR, 'not a directory', path) super().__init__(*(path, *args), **kwargs) +@deprecated('Use pathlib.Path instead.') class ExistingFile(pathlib.Path): ''' pathlib.Path subclass that is a file.