Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 91270d3

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 6050d0f according to the output from Autopep8. Details: https://app.deepsource.com/gh/avinashkranjan/Amazing-Python-Scripts/transform/62e7ad07-0669-4868-97a5-aa03ead6f0db/
1 parent 6050d0f commit 91270d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎File Search/File_Search.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22

3+
34
def search_files(directory, extension):
45
found_files = []
56
for root, dirs, files in os.walk(directory):
@@ -8,11 +9,13 @@ def search_files(directory, extension):
89
found_files.append(os.path.join(root, file))
910
return found_files
1011

12+
1113
def main():
1214
print("File Search")
1315
print("-----------")
1416
directory = input("Enter the directory to search: ")
15-
extension = input("Enter the file extension to search for (e.g., .txt, .jpg): ")
17+
extension = input(
18+
"Enter the file extension to search for (e.g., .txt, .jpg): ")
1619

1720
found_files = search_files(directory, extension)
1821

@@ -23,6 +26,6 @@ def main():
2326
else:
2427
print("No files with the specified extension were found.")
2528

29+
2630
if __name__ == "__main__":
2731
main()
28-

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /