Skip to content

Commit

Permalink
Fix type annotations for Size and Point
Browse files Browse the repository at this point in the history
  • Loading branch information
dmvass authored and gnachman committed Aug 25, 2019
1 parent 706a8f9 commit 0ed945a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions api/library/python/iterm2/iterm2/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Size:
Can be used where api_pb2.Size is accepted."""

def __init__(self, width: float, height: float):
def __init__(self, width: int, height: int):
"""Constructs a new size.
:param width: A nonnegative number giving the width.
Expand All @@ -19,19 +19,19 @@ def __init__(self, width: float, height: float):
self.__height = height

@property
def width(self) -> float:
def width(self) -> int:
return self.__width

@width.setter
def width(self, value: float):
def width(self, value: int):
self.__width = value

@property
def height(self) -> float:
def height(self) -> int:
return self.__height

@height.setter
def height(self, value: float):
def height(self, value: int):
self.__height = value

@property
Expand Down Expand Up @@ -67,7 +67,7 @@ class Point:
Can be used where api_pb2.Point is accepted."""

def __init__(self, x: float, y: float):
def __init__(self, x: int, y: int):
"""Constructs a new point.
:param x: A number giving the X coordinate.
Expand All @@ -84,19 +84,19 @@ def from_coord_proto(proto):
return Point(proto.x, proto.y)

@property
def x(self) -> float:
def x(self) -> int:
return self.__x

@x.setter
def x(self, value: float):
def x(self, value: int):
self.__x = value

@property
def y(self) -> float:
def y(self) -> int:
return self.__y

@y.setter
def y(self, value: float):
def y(self, value: int):
self.__y = value

@property
Expand Down

0 comments on commit 0ed945a

Please sign in to comment.