home · contact · privacy
Improve type hints sufficiently for mypy not to complain, and for Day.__eq__ check...
[plomtask] / days.py
diff --git a/days.py b/days.py
index 42fc4c15280f616f0ee637503a4c98319e40d2c6..8db9f15b7362ede61c70265e4d5eb8a4c2c0c626 100644 (file)
--- a/days.py
+++ b/days.py
@@ -8,7 +8,7 @@ DATE_FORMAT = '%Y-%m-%d'
 class Day:
     """Individual days defined by their dates."""
 
-    def __init__(self, date:str):
+    def __init__(self, date: str):
         self.date = date
         self.datetime = datetime.strptime(date, DATE_FORMAT)
 
@@ -17,8 +17,8 @@ class Day:
         """Return what weekday matches self.date."""
         return self.datetime.strftime('%A')
 
-    def __eq__(self, other:object):
+    def __eq__(self, other: object):
         return isinstance(other, self.__class__) and self.date == other.date
 
-    def __lt__(self, other:Day):
+    def __lt__(self, other):
         return self.date < other.date