style: Run linter to format code in wanikani_lessons.py
This commit is contained in:
parent
fcb8df6619
commit
0d787532d4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user