Closed
Description
The View.width
and View.height
properties both claim to be aliases for Window.width
and Window.height
respectively. They also directly return those properties. View.width
and View.height
, however, have type hints for float
return types.
Lines 1552 to 1564 in cdd6f66
The definitions for Window.width
and Window.height
, however, hint that they return int
types.
@property
def width(self) -> int:
"""The width of the window, in pixels. Read-write."""
return self.get_size()[0]
@width.setter
def width(self, new_width: int) -> None:
self.set_size(new_width, self.height)
@property
def height(self) -> int:
"""The height of the window, in pixels. Read-write."""
return self.get_size()[1]
@height.setter
def height(self, new_height: int) -> None:
self.set_size(self.width, new_height)
The return type hints for View.width
and View.height
should be updated to reflect that they return int
s
Metadata
Metadata
Assignees
Labels
No labels