Skip to content

Commit

Permalink
Fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Jan 9, 2025
1 parent a17fea6 commit 1e5cb8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion lute/book/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from wtforms.validators import DataRequired, Length, NumberRange
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed
from lute.book.service import Service


def _tag_values(field_data):
Expand Down
12 changes: 7 additions & 5 deletions lute/book/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@
flash,
)
from lute.utils.data_tables import DataTablesFlaskParamParser
from lute.book.service import Service, BookImportException, BookDataFromUrl
from lute.book.service import (
Service as BookService,
BookImportException,
BookDataFromUrl,
)
from lute.book.datatables import get_data_tables_list
from lute.book.forms import NewBookForm, EditBookForm
from lute.book.stats import Service as StatsService
import lute.utils.formutils
from lute.db import db

from lute.models.language import Language
from lute.models.repositories import (
BookRepository,
UserSettingRepository,
LanguageRepository,
)
from lute.book.model import Book, Repository
from lute.book.service import Service as BookService


bp = Blueprint("book", __name__, url_prefix="/book")
Expand Down Expand Up @@ -85,7 +87,7 @@ def datatables_archived_source():

def _book_from_url(url):
"Get data for a new book, or flash an error if can't parse."
service = Service()
service = BookService()
bd = None
try:
bd = service.book_data_from_url(url)
Expand Down Expand Up @@ -155,7 +157,7 @@ def edit(bookid):
if form.validate_on_submit():
form.populate_obj(b)
svc = BookService()
book = svc.import_book(b, db.session)
svc.import_book(b, db.session)
flash(f"{b.title} updated.")
return redirect("/", 302)

Expand Down

0 comments on commit 1e5cb8d

Please sign in to comment.