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 da6c831

Browse files
Merge pull request avinashkranjan#2821 from avinashkranjan/deepsource-transform-8401355a
format code with autopep8
2 parents bdc91b9 + e0bc914 commit da6c831

File tree

1 file changed

+8
-3
lines changed
  • Website Status Checker GUI

1 file changed

+8
-3
lines changed

‎Website Status Checker GUI/app.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
from http import HTTPStatus
44
from fake_useragent import UserAgent
55

6+
67
def get_status(status_code: int) -> str:
78
for value in HTTPStatus:
89
if value.value == status_code:
910
description = f'({value.value} {value.name}) {value.description}'
1011
return description
1112
return "Unknown Status Code..."
1213

14+
1315
def check_website():
1416
website_url = website_entry.get()
1517
result_text.delete("1.0", tk.END)
@@ -24,17 +26,20 @@ def check_website():
2426

2527
result_text.insert(tk.END, result)
2628

29+
2730
root = tk.Tk()
2831
root.title("Website Checker")
29-
root.configure(bg="#1e1e1e")
32+
root.configure(bg="#1e1e1e")
3033

31-
website_label = tk.Label(root, text="Enter Website URL:", bg="#1e1e1e", fg="white")
34+
website_label = tk.Label(
35+
root, text="Enter Website URL:", bg="#1e1e1e", fg="white")
3236
website_label.pack(pady=5)
3337

3438
website_entry = tk.Entry(root, width=50)
3539
website_entry.pack(pady=5)
3640

37-
check_button = tk.Button(root, text="Check Website", command=check_website, bg="#303030", fg="white")
41+
check_button = tk.Button(root, text="Check Website",
42+
command=check_website, bg="#303030", fg="white")
3843
check_button.pack(pady=5)
3944

4045
result_text = tk.Text(root, wrap=tk.WORD, bg="#1e1e1e", fg="white")

0 commit comments

Comments
(0)

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