From 790ef57598858bd8a504116e4e2a30bf9edf4ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Sun, 23 Apr 2023 20:49:28 +0200 Subject: [PATCH] Add extra check for TimeRange validity. --- org_rw/org_rw.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index 734851f..90ff004 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -1067,6 +1067,8 @@ def token_from_type(tok_type): class TimeRange: def __init__(self, start_time: OrgTime, end_time: OrgTime): + assert start_time is not None + assert end_time is not None self.start_time = start_time self.end_time = end_time