From: Christian Heller Date: Mon, 11 Nov 2024 07:42:00 +0000 (+0100) Subject: Minor typing fix. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Byoutube_prefix%7D%7D%7B%7Bvideo_id%7D%7D?a=commitdiff_plain;h=117ea8cc66eb5ba76d52cdab83eeef8ed62ed03d;p=ytplom Minor typing fix. --- diff --git a/ytplom.py b/ytplom.py index 320872c..37c73ef 100755 --- a/ytplom.py +++ b/ytplom.py @@ -254,12 +254,12 @@ class TaskHandler(BaseHTTPRequestHandler): with open(file.path, 'r', encoding='utf8') as query_file: filed_query: QueryData = json_load(query_file) assert isinstance(filed_query['results'], list) - assert type(filed_query['text']) is QueryText - assert type(filed_query['retrieved_at']) is DatetimeStr + assert isinstance(filed_query['text'], str) + assert isinstance(filed_query['retrieved_at'], str) id_ = QueryId(splitext(basename(file.path))[0]) results_list = filed_query['results'] - query_text = filed_query['text'] - retrieved_at = filed_query['retrieved_at'] + query_text = QueryText(filed_query['text']) + retrieved_at = DatetimeStr(filed_query['retrieved_at']) queries_data += [(id_, results_list, query_text, retrieved_at)] return queries_data