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 7363c76

Browse files
Merge pull request avinashkranjan#2917 from avinashkranjan/deepsource-transform-8f549ed8
format code with autopep8
2 parents a164133 + 4f1dab0 commit 7363c76

File tree

1 file changed

+7
-2
lines changed
  • Common Password Checker

1 file changed

+7
-2
lines changed

‎Common Password Checker/app.py

Lines changed: 7 additions & 2 deletions
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)

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