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 c3f8f52

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 1f1029a according to the output from Autopep8. Details: https://app.deepsource.com/gh/avinashkranjan/Amazing-Python-Scripts/transform/6d6af012-f4e2-4311-bafa-a1811a08cb04/
1 parent 1f1029a commit c3f8f52

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

‎Wallpaper_viewer/wallpaper_view.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22
from PIL import ImageTk, Image
33
import os
44

5+
56
def rotate_image():
67
global counter
7-
img_label.config(image=img_array[counter%len(img_array)])
8+
img_label.config(image=img_array[counter%len(img_array)])
89
counter = counter+1
10+
11+
912
counter = 1
1013
root = Tk()
1114
root.title('Wallpaper viewer')
12-
root.minsize(250,400)
15+
root.minsize(250,400)
1316
root.configure(background='black')
14-
#img = Image.open('wallpaper/Screenshot_20210215-182223_Truecaller.jpg')
17+
#img = Image.open('wallpaper/Screenshot_20210215-182223_Truecaller.jpg')
1518
files = os.listdir(r'.\wallpaper')
16-
#files = os.listdir('.')
17-
img_array =[]
19+
#files = os.listdir('.')
20+
img_array =[]
1821
for file in files:
19-
img = Image.open(os.path.join(r'.\wallpaper',file))
20-
resized_img = img.resize((250,300))
22+
img = Image.open(os.path.join(r'.\wallpaper',file))
23+
resized_img = img.resize((250,300))
2124
img_array.append(ImageTk.PhotoImage(resized_img))
22-
img_label = Label(root,image=img_array[0])
23-
img_label.pack(pady=(15,10))
25+
img_label = Label(root,image=img_array[0])
26+
img_label.pack(pady=(15,10))
2427

25-
next_btn =Button(root,text='Next', bg='white', fg='black', width=25, height=2, command= rotate_image)
28+
next_btn = Button(root, text='Next', bg='white', fg='black',
29+
width=25, height=2, command=rotate_image)
2630

2731

2832
next_btn.pack()
29-
root.mainloop()
33+
root.mainloop()

0 commit comments

Comments
(0)

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