Skip to content

Commit 4f1dab0

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 1c696ff according to the output from Autopep8. Details: None
1 parent 0765566 commit 4f1dab0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Common Password Checker/app.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
import tkinter as tk
22
from tkinter import messagebox
33

4+
45
def check_password(password):
56
with open("pwd.txt", "r") as file:
67
common_passwords = file.read().splitlines()
78

89
for i, common_pwd in enumerate(common_passwords, start=1):
910
if password == common_pwd:
10-
messagebox.showinfo("Password Check", f"{password}: not unique (#{i})")
11+
messagebox.showinfo(
12+
"Password Check", f"{password}: not unique (#{i})")
1113
return
1214

1315
messagebox.showinfo("Password Check", f"{password}: unique")
1416

17+
1518
def main():
1619
app = tk.Tk()
1720
app.title("Password Checker")
@@ -23,10 +26,12 @@ def main():
2326
password_entry = tk.Entry(app, show="*")
2427
password_entry.pack()
2528

26-
check_button = tk.Button(app, text="Check", command=lambda: check_password(password_entry.get()))
29+
check_button = tk.Button(
30+
app, text="Check", command=lambda: check_password(password_entry.get()))
2731
check_button.pack()
2832

2933
app.mainloop()
3034

35+
3136
if __name__ == "__main__":
3237
main()

0 commit comments

Comments
 (0)