Skip to content

Commit 47182ee

Browse files
committed
feat: FileSysCollection.with_relative_paths
1 parent e3acfa9 commit 47182ee

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dol/filesys.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ def is_valid_key(self, k):
223223
return bool(self._key_pattern.match(k))
224224

225225
def validate_key(
226-
self, k, err_msg_format=_dflt_not_valid_error_msg, err_type=KeyValidationError,
226+
self,
227+
k,
228+
err_msg_format=_dflt_not_valid_error_msg,
229+
err_type=KeyValidationError,
227230
):
228231
if not self.is_valid_key(k):
229232
raise err_type(err_msg_format.format(k))
@@ -234,6 +237,10 @@ def __repr__(self):
234237
)
235238
return f'{type(self).__name__}({input_str})'
236239

240+
def with_relative_paths(self):
241+
"""Return a copy of self with relative paths"""
242+
return with_relative_paths(self)
243+
237244

238245
class DirCollection(FileSysCollection):
239246
def __iter__(self):

0 commit comments

Comments
 (0)