Skip to content

Commit 41d0fda

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c70aac7 commit 41d0fda

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

openlibrary/plugins/openlibrary/partials.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
from openlibrary.plugins.openlibrary.lists import get_user_lists
1515
from openlibrary.plugins.upstream.checkins import get_reading_goals
1616
from openlibrary.plugins.worksearch.code import do_search, work_search
17-
from openlibrary.plugins.worksearch.subjects import date_range_to_publish_year_filter, get_subject
17+
from openlibrary.plugins.worksearch.subjects import (
18+
date_range_to_publish_year_filter,
19+
get_subject,
20+
)
1821
from openlibrary.views.loanstats import get_trending_books
1922

2023

@@ -192,7 +195,9 @@ def _do_subjects_query(self, params: dict) -> list:
192195
published_in = params.get("published_in", "")
193196
publish_year = date_range_to_publish_year_filter(published_in)
194197

195-
subject = get_subject(pseudoKey, offset=offset, limit=limit, publish_year=publish_year)
198+
subject = get_subject(
199+
pseudoKey, offset=offset, limit=limit, publish_year=publish_year
200+
)
196201
return subject.get("works", [])
197202

198203

openlibrary/plugins/worksearch/subjects.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ def GET(self, key):
112112
if i.get('has_fulltext') == 'true':
113113
filters['has_fulltext'] = 'true'
114114

115-
if publish_year_filter := date_range_to_publish_year_filter(i.get('published_in')):
115+
if publish_year_filter := date_range_to_publish_year_filter(
116+
i.get('published_in')
117+
):
116118
filters['publish_year'] = publish_year_filter
117119

118120
subject_results = get_subject(

0 commit comments

Comments
 (0)