From c9b64fa5571bdb8f3bda313009da2894f98c9ac0 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Sat, 17 Sep 2022 19:50:07 +0200 Subject: [PATCH] pep8 --- moderngl_window/context/base/window.py | 6 +++--- moderngl_window/context/glfw/window.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/moderngl_window/context/base/window.py b/moderngl_window/context/base/window.py index ccb5377..3718631 100644 --- a/moderngl_window/context/base/window.py +++ b/moderngl_window/context/base/window.py @@ -388,7 +388,6 @@ def vsync(self, value: bool): self._set_vsync(value) self._vsync = value - @property def aspect_ratio(self) -> float: """float: The current aspect ratio of the window. @@ -642,7 +641,7 @@ def convert_window_coordinates(self, x, y, x_flipped=False, y_flipped=False): elif y_flipped and not x_flipped: return (x, self.height - y) else: - return(self.width - x, self.height - y) + return (self.width - x, self.height - y) def is_key_pressed(self, key) -> bool: """Returns: The press state of a key""" @@ -743,7 +742,7 @@ def _set_vsync(self, value: bool) -> None: "Toggling vsync is currently not supported by Window-type: {}".format( self.name ) - ) + ) def destroy(self) -> None: """ @@ -831,6 +830,7 @@ def on_generic_event_func(self): def on_generic_event_func(self, func): self._on_generic_event_func = func + class WindowConfig: """ Creating a ``WindowConfig`` instance is the simplest interface diff --git a/moderngl_window/context/glfw/window.py b/moderngl_window/context/glfw/window.py index 25e00ee..a254c64 100644 --- a/moderngl_window/context/glfw/window.py +++ b/moderngl_window/context/glfw/window.py @@ -123,7 +123,7 @@ def _set_fullscreen(self, value: bool) -> None: glfw.swap_interval(1) else: glfw.swap_interval(0) - + def _set_vsync(self, value: bool) -> None: glfw.swap_interval(value)