29
29
def create_window (width = 1280 , height = 720 , caption = "Testing" , ** kwargs ):
30
30
global WINDOW
31
31
if not WINDOW :
32
- WINDOW = REAL_WINDOW_CLASS (width = width , height = height , title = caption , vsync = False , antialiasing = False )
32
+ WINDOW = REAL_WINDOW_CLASS (
33
+ width = width , height = height , title = caption , vsync = False , antialiasing = False
34
+ )
33
35
WINDOW .set_vsync (False )
34
36
# This value is being monkey-patched into the Window class so that tests can identify if we are using
35
37
# arcade-accelerate easily in case they need to disable something when it is enabled.
@@ -164,7 +166,7 @@ def projection(self, projection):
164
166
165
167
@property
166
168
def viewport (self ):
167
- return self .window .viewport
169
+ return self .window .viewport
168
170
169
171
@viewport .setter
170
172
def viewport (self , viewport ):
@@ -282,11 +284,11 @@ def default_camera(self):
282
284
def use (self ):
283
285
self .window .use ()
284
286
285
- def push_handlers (self , * handlers ):
286
- self .window .push_handlers (* handlers )
287
+ def push_handlers (self , * args , ** kwargs ):
288
+ self .window .push_handlers (* args , ** kwargs )
287
289
288
- def remove_handlers (self , * handlers ):
289
- self .window .remove_handlers (* handlers )
290
+ def remove_handlers (self , * args , ** kwargs ):
291
+ self .window .remove_handlers (* args , ** kwargs )
290
292
291
293
def run (self ):
292
294
self .window .run ()
@@ -309,7 +311,6 @@ def fixed_delta_time(self) -> float:
309
311
return self .window ._fixed_rate
310
312
311
313
312
-
313
314
@pytest .fixture (scope = "function" )
314
315
def window_proxy ():
315
316
"""Monkey patch the open_window function and return a WindowTools instance."""
@@ -364,7 +365,9 @@ def read_pixel(self, x, y, components=3) -> tuple[int, int, int, int] | tuple[in
364
365
365
366
def read_region (self , rect : Rect ) -> list [tuple [int , int , int , int ]]:
366
367
"""Read a region of RGBA pixels from the offscreen buffer"""
367
- data = self .fbo .read (components = 4 , viewport = (rect .left , rect .bottom , rect .width , rect .height ))
368
+ data = self .fbo .read (
369
+ components = 4 , viewport = (rect .left , rect .bottom , rect .width , rect .height )
370
+ )
368
371
return [
369
372
(
370
373
int .from_bytes (data [i : i + 4 ], "little" ),
0 commit comments