Skip to content

Commit ef5c342

Browse files
committed
formatting with ruff
1 parent f73102e commit ef5c342

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

implement-shell-tools/cat/cat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ def run(args):
1414
counter_number += 1
1515
print(f"{prefix} {line}", end="")
1616

17-
1817

1918
def main():
2019
parser = argparse.ArgumentParser(

implement-shell-tools/ls/ls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
def show_files(files, show_hidden):
66
for file in files:
77
if show_hidden or not file.startswith("."):
8-
print(file)
8+
print(file)
99

1010

1111
parser = argparse.ArgumentParser(
@@ -23,4 +23,3 @@ def show_files(files, show_hidden):
2323

2424
directory_path = args.path
2525
listDir = os.listdir(directory_path)
26-

implement-shell-tools/wc/wc.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
)
77

88

9-
10-
119
def read_file(file_path):
1210
with open(file_path, "r") as file:
1311
return file.read()
@@ -20,8 +18,6 @@ def count_text(text):
2018
return line_count, word_count, char_count
2119

2220

23-
24-
2521
lineCounter = 0
2622
wordCounter = 0
2723
charCounter = 0
@@ -33,7 +29,6 @@ def count_text(text):
3329
args = parser.parse_args()
3430

3531

36-
3732
for path in args.path:
3833
text = read_file(path)
3934
lines, words, chars = count_text(text)
@@ -59,4 +54,4 @@ def count_text(text):
5954
elif args.c:
6055
print(charCounter, "total")
6156
else:
62-
print(lineCounter, wordCounter, charCounter, "total")
57+
print(lineCounter, wordCounter, charCounter, "total")

0 commit comments

Comments
 (0)