generated from jCloud/repository-template
chore(utils): mark ExistingDirectory and ExistingFile as deprecated
This commit is contained in:
2 files changed
+14
No files matched your search
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
|
||||||
|
- utility class for existing directories
|
||||||
|
- utility class for existing files
|
||||||
|
|
||||||
## [0.1.0] - 2026-09-01
|
## [0.1.0] - 2026-09-01
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ import errno
|
|||||||
from typing import Union
|
from typing import Union
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
try:
|
||||||
|
from warnings import deprecated
|
||||||
|
except ImportError:
|
||||||
|
from typing_extensions import deprecated
|
||||||
|
|
||||||
|
@deprecated('Use pathlib.Path instead.')
|
||||||
class ExistingDirectory(pathlib.Path):
|
class ExistingDirectory(pathlib.Path):
|
||||||
'''
|
'''
|
||||||
pathlib.Path subclass that is a directory.
|
pathlib.Path subclass that is a directory.
|
||||||
@@ -37,6 +43,7 @@ class ExistingDirectory(pathlib.Path):
|
|||||||
raise NotADirectoryError(errno.ENOTDIR, 'not a directory', path)
|
raise NotADirectoryError(errno.ENOTDIR, 'not a directory', path)
|
||||||
super().__init__(*(path, *args), **kwargs)
|
super().__init__(*(path, *args), **kwargs)
|
||||||
|
|
||||||
|
@deprecated('Use pathlib.Path instead.')
|
||||||
class ExistingFile(pathlib.Path):
|
class ExistingFile(pathlib.Path):
|
||||||
'''
|
'''
|
||||||
pathlib.Path subclass that is a file.
|
pathlib.Path subclass that is a file.
|
||||||
|
|||||||
Reference in new issue
Block a user