Skip to content

Commit 8ad024b

Browse files
josixezio-melotti
andauthored
Update .scripts/intercept.py
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
1 parent c13a0ab commit 8ad024b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.scripts/intercept.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ def get_pofile_from_path(path: Path) -> polib.POFile:
2525

2626
if __name__ == '__main__':
2727
parser = argparse.ArgumentParser()
28-
parser.add_argument(
29-
"path",
30-
help="the path of a PO file",
31-
)
32-
parser.add_argument("-n", '--occurrence_number', type=int, default=1)
28+
parser.add_argument("path", type=Path,
29+
help="the path of a PO file")
30+
parser.add_argument("-n", '--occurrence_number',
31+
type=int, default=1)
3332
args = parser.parse_args()
34-
path = Path(args.path).resolve()
33+
path = args.path.resolve()
3534
pofile = get_pofile_from_path(path)
3635
occurrence_number = args.occurrence_number
3736

0 commit comments

Comments
 (0)