mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-20 04:12:05 +08:00
enable flake8 E231: missing whitespace after comma
This commit is contained in:
+5
-5
@@ -10,17 +10,17 @@ class Window():
|
||||
pygame.display.set_caption(caption)
|
||||
self.double = double
|
||||
if self.double:
|
||||
self.screen = pygame.display.set_mode((w*2,h*2))
|
||||
self.screen = pygame.display.set_mode((w*2, h*2))
|
||||
else:
|
||||
self.screen = pygame.display.set_mode((w,h))
|
||||
self.screen = pygame.display.set_mode((w, h))
|
||||
|
||||
def draw(self, out):
|
||||
pygame.event.pump()
|
||||
if self.double:
|
||||
out2 = cv2.resize(out, (self.w*2, self.h*2))
|
||||
pygame.surfarray.blit_array(self.screen, out2.swapaxes(0,1))
|
||||
pygame.surfarray.blit_array(self.screen, out2.swapaxes(0, 1))
|
||||
else:
|
||||
pygame.surfarray.blit_array(self.screen, out.swapaxes(0,1))
|
||||
pygame.surfarray.blit_array(self.screen, out.swapaxes(0, 1))
|
||||
pygame.display.flip()
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class Window():
|
||||
if __name__ == "__main__":
|
||||
import numpy as np
|
||||
win = Window(200, 200, double=True)
|
||||
img = np.zeros((200,200,3), np.uint8)
|
||||
img = np.zeros((200, 200, 3), np.uint8)
|
||||
while 1:
|
||||
print("draw")
|
||||
img += 1
|
||||
|
||||
Reference in New Issue
Block a user