Towards mypy cleanliness.
[kiosk.git] / gcal_trigger.py
index b7da3b2c2ce5a8b9dea43837bfa85a03ee447073..b843433ac94ec6c7bf1ff28f5d35ab724ef964e8 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-from typing import Tuple
+from typing import Optional, Tuple
 
 import constants
 import globals
@@ -8,7 +8,7 @@ import trigger
 
 
 class gcal_trigger(trigger.trigger):
-    def get_triggered_page_list(self) -> Tuple[str, int]:
+    def get_triggered_page_list(self) -> Optional[Tuple[str, int]]:
         if globals.get("gcal_triggered"):
             print("****** gcal has an imminent upcoming event. ******")
             return (constants.gcal_imminent_pagename, trigger.trigger.PRIORITY_HIGH)