moar code linting

This commit is contained in:
Hugh Rundle 2021-11-22 13:01:58 +11:00
parent a9d921cc06
commit d8e83ffe82
No known key found for this signature in database
GPG key ID: CD23D6039184286B
2 changed files with 2 additions and 6 deletions

View file

@ -54,10 +54,7 @@ def get_other_identifier(element, code):
# try sources
for source in element.findall(".//sources"):
code_of_source = source.find(".//codeOfSource")
if (
code_of_source is not None
and code_of_source.text.lower() == code.lower()
):
if code_of_source is not None and code_of_source.text.lower() == code.lower():
return source.find(".//sourceIdentifier").text
return ""
@ -184,5 +181,3 @@ def augment_author_metadata(author, isni):
aliases.add(alias)
author.aliases = list(aliases)
author.save()
return

View file

@ -152,6 +152,7 @@ class ConfirmEditBook(View):
"""confirm edits to a book"""
# pylint: disable=too-many-locals
# pylint: disable=too-many-branches
def post(self, request, book_id=None):
"""edit a book cool"""
# returns None if no match is found