Refactor: Allow only pathlib.Path
as type for the path
field in ListEntry
model
#16
Labels
pathlib.Path
as type for the path
field in ListEntry
model
#16
I'll suggest to use a
pathlib.Path
type only instead of also allowing astr
to set inListEntry
model. This would be more straight forward for returning only one type, instead of guessing the right one.In case of getting
relative_paths
out of the model, we can then use one of the following implementations in_PathTreeGenerator
:p.relative_to(self._root_dir)
, ifrelative_paths=True
p.relative_to('.')
, ifrelative_paths=False
This can makt it easier to determine the absolute or relative
path
of aListEntry
inPathTree(...).tree()
.The text was updated successfully, but these errors were encountered: