From a4196f2b13526c2fb81622c71044dbc8e3922a18 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 10 Oct 2021 00:31:43 -0700 Subject: [PATCH] Add aliases assert_is_dir, assert_not_dir. --- voussoirkit/pathclass.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index 76fdd03..c37a800 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -167,6 +167,8 @@ class Path: if self.is_dir: raise IsDirectory(self) + assert_not_dir = assert_not_directory + def assert_not_link(self): if self.is_link: raise IsLink(self) @@ -179,6 +181,8 @@ class Path: if not self.is_dir: raise NotDirectory(self) + assert_is_dir = assert_is_directory + def assert_is_link(self): if not self.is_link: raise NotLink(self)