From ae1a7990e3f10fbcd925ce505efa8bdf79bc8961 Mon Sep 17 00:00:00 2001 From: jachamp <28732543+jimchamp@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:45:08 -0800 Subject: [PATCH] Updates the order of Python imports --- openlibrary/core/models.py | 1 - openlibrary/plugins/upstream/addtag.py | 4 +--- openlibrary/plugins/worksearch/subjects.py | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/openlibrary/core/models.py b/openlibrary/core/models.py index fd0f7e791b23..4dbe3f32cc60 100644 --- a/openlibrary/core/models.py +++ b/openlibrary/core/models.py @@ -1,7 +1,6 @@ """Models of various OL objects. """ -import json import logging from collections import defaultdict from dataclasses import dataclass, field diff --git a/openlibrary/plugins/upstream/addtag.py b/openlibrary/plugins/upstream/addtag.py index 7f6e2fc30a95..507cf98b9d12 100644 --- a/openlibrary/plugins/upstream/addtag.py +++ b/openlibrary/plugins/upstream/addtag.py @@ -1,14 +1,12 @@ """Handlers for adding and editing tags.""" from typing import NoReturn - import web from infogami.core.db import ValidationException from infogami.infobase.client import ClientException from infogami.utils import delegate from infogami.utils.view import add_flash_message, public - from openlibrary.accounts import get_current_user from openlibrary.plugins.upstream import spamcheck from openlibrary.plugins.upstream.addbook import safe_seeother, trim_doc @@ -227,7 +225,7 @@ def POST(self, tag_type): "message.html", "Oops", 'Something went wrong. Please try again later.' ) if not (patron := get_current_user()): - raise web.seeother(f'/account/login') + raise web.seeother('/account/login') if not self.has_permission(patron): raise web.unauthorized() diff --git a/openlibrary/plugins/worksearch/subjects.py b/openlibrary/plugins/worksearch/subjects.py index bebe180ca6e5..2ffe900143c3 100644 --- a/openlibrary/plugins/worksearch/subjects.py +++ b/openlibrary/plugins/worksearch/subjects.py @@ -11,7 +11,6 @@ from infogami.plugins.api.code import jsonapi from infogami.utils import delegate from infogami.utils.view import render_template, safeint - from openlibrary.core.lending import add_availability from openlibrary.core.models import Subject, Tag from openlibrary.solr.query_utils import query_dict_to_str