@@ -48,30 +48,30 @@ class Point:
4848 def __init__ (self , x , y ) -> None :
4949 self .x , self .y = float (x ), float (y )
5050
51- def __eq__ (self , other ):
51+ def __eq__ (self , other ) -> bool :
5252 return self .x == other .x and self .y == other .y
5353
54- def __ne__ (self , other ):
54+ def __ne__ (self , other ) -> bool :
5555 return not self == other
5656
57- def __gt__ (self , other ):
57+ def __gt__ (self , other ) -> bool :
5858 if self .x > other .x :
5959 return True
6060 elif self .x == other .x :
6161 return self .y > other .y
6262 return False
6363
64- def __lt__ (self , other ):
64+ def __lt__ (self , other ) -> bool :
6565 return not self > other
6666
67- def __ge__ (self , other ):
67+ def __ge__ (self , other ) -> bool :
6868 if self .x > other .x :
6969 return True
7070 elif self .x == other .x :
7171 return self .y >= other .y
7272 return False
7373
74- def __le__ (self , other ):
74+ def __le__ (self , other ) -> bool :
7575 if self .x < other .x :
7676 return True
7777 elif self .x == other .x :
@@ -81,7 +81,7 @@ def __le__(self, other):
8181 def __repr__ (self ) -> str :
8282 return f"({ self .x } , { self .y } )"
8383
84- def __hash__ (self ):
84+ def __hash__ (self ) -> int :
8585 return hash (self .x )
8686
8787
0 commit comments