Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
einarf committed Sep 17, 2022
1 parent f050cfe commit c9b64fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions moderngl_window/context/base/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"""
Expand Down Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion moderngl_window/context/glfw/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c9b64fa

Please sign in to comment.