Skip to content

Commit a88b6a2

Browse files
authored
Merge pull request #90 from braboj/codex/update-default-argument-for-directory
Update CLI default directory
2 parents a508b6b + d405753 commit a88b6a2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/snake_to_kebab.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/usr/bin/env python3
2+
"""Command-line script to rename snake_case filenames to kebab-case.
3+
4+
The optional ``directory`` argument defaults to the current working
5+
directory when not specified.
6+
"""
7+
28
import os
39
import re
410
import argparse
@@ -75,8 +81,8 @@ def rename_in_dir(path: str, recursive: bool = True):
7581
parser.add_argument(
7682
"directory",
7783
nargs="?",
78-
default="C:\Workspace\tutorial-python",
79-
help="Target directory (default: current directory)"
84+
default=os.getcwd(),
85+
help="Target directory (default: current working directory)"
8086
)
8187

8288
# Add an optional argument for recursive renaming

0 commit comments

Comments
 (0)