Skip to content

Commit 9f5649f

Browse files
committed
update the default paremeter of the helper function process_file to file_path instead
1 parent e9f2a54 commit 9f5649f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • implement-shell-tools/wc

implement-shell-tools/wc/wc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ def process_file(file_path):
3030
stats = counter(content)
3131

3232
if args.line:
33-
print(f"{stats['lines']} {path}")
33+
print(f"{stats['lines']} {file_path}}")
3434
elif args.word:
35-
print(f"{stats['words']} {path}")
35+
print(f"{stats['words']} {file_path}}")
3636
elif args.char:
37-
print(f"{stats['characters']} {path}")
37+
print(f"{stats['characters']} {file_path}}")
3838
else:
39-
print(f"{stats['lines']} {stats['words']} {stats['characters']} {path}")
39+
print(f"{stats['lines']} {stats['words']} {stats['characters']} {file_path}}")
4040

4141

4242
total_lines = 0

0 commit comments

Comments
 (0)