From 0d787532d45339ab62ac3a54c554a1aabcddc3a7 Mon Sep 17 00:00:00 2001 From: "Jon Michael Aanes (aider)" Date: Mon, 24 Mar 2025 20:26:58 +0100 Subject: [PATCH] style: Run linter to format code in wanikani_lessons.py --- personal_data/fetchers/wanikani_lessons.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/personal_data/fetchers/wanikani_lessons.py b/personal_data/fetchers/wanikani_lessons.py index 575ac36..99cbd20 100644 --- a/personal_data/fetchers/wanikani_lessons.py +++ b/personal_data/fetchers/wanikani_lessons.py @@ -1,8 +1,8 @@ import dataclasses import datetime -from email.utils import parsedate_to_datetime import logging from collections.abc import Iterator, Mapping +from email.utils import parsedate_to_datetime import requests_util @@ -89,9 +89,13 @@ class WaniKaniSummaryFetcher(Scraper): total_lessons = sum(len(lesson.get('subject_ids', [])) for lesson in lessons) reviews = data.get('data', {}).get('reviews', []) - date_hdr = response.headers.get("Date") + date_hdr = response.headers.get('Date') try: - now = parsedate_to_datetime(date_hdr) if date_hdr else datetime.datetime.now(datetime.timezone.utc) + now = ( + parsedate_to_datetime(date_hdr) + if date_hdr + else datetime.datetime.now(datetime.timezone.utc) + ) except Exception: now = datetime.datetime.now(datetime.timezone.utc) total_reviews = 0