Browse Source

MyPy のエラー対応

feature/query
みてるぞ 1 month ago
parent
commit
d226b443d7
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      update_db.py

+ 2
- 4
update_db.py View File

@@ -91,13 +91,11 @@ def update_tables (
) -> None:
video_ids: list[int] = []
for datum in api_data:
tag_names = datum['tags'].split ()
tag_names: list[str] = datum['tags'].split ()
video = VideoDto (code = datum['contentId'],
title = datum['title'],
description = datum['description'],
description = datum['description'] or '',
uploaded_at = datetime.fromisoformat (datum['startTime']))
if video.description is None:
video.description = ''
video_dao.upsert (video, False)
if video.id_ is not None:
video_ids.append (video.id_)


Loading…
Cancel
Save