Skip to content

Commit

Permalink
str to Path
Browse files Browse the repository at this point in the history
  • Loading branch information
Alyetama committed Sep 8, 2022
1 parent 8c8f3e3 commit b26a8e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions detoxpy/detox.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def run(self) -> List[Tuple[Path, Path]]:

for change in changes:
if self.plain_print:
print(change[1].name)
print(Path(change[1]).name)
else:
print(f'\33[31m\'{change[0].name}\'\x1b[0m --> '
f'\33[32m\'{change[1].name}\'\x1b[0m')
print(f'\33[31m\'{Path(change[0]).name}\'\x1b[0m --> '
f'\33[32m\'{Path(change[1]).name}\'\x1b[0m')

changes = [x for x in changes if Path(x[1]).exists()]
return changes
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "detoxpy"
version = "0.1.3"
version = "0.1.4"
description = "A tool to rename directories/files that contain unsafe characters"
authors = ["Alyetama <malyetama@pm.me>"]
license = "MIT"
Expand Down

0 comments on commit b26a8e4

Please sign in to comment.