Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 29, 2023
1 parent 266165e commit 5f6fc8f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions isbn10to13bot/isbn_10_to_13.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class ConvertISBN10to13Job(olclient.AbstractBotJob):

def run(self) -> None:
"""Looks for any ISBN 10s to convert to 13"""
self.write_changes_declaration()
Expand Down Expand Up @@ -48,14 +47,15 @@ def run(self) -> None:
isbns_13.append(isbn_13)

if len(isbns_13) > 1:
isbns_13 = dedupe(isbns_13) # remove duplicates, shouldn't normally be necessary
isbns_13 = dedupe(
isbns_13
) # remove duplicates, shouldn't normally be necessary

setattr(edition, 'isbn_13', isbns_13)
self.logger.info(
"\t".join([olid, str(isbns_10), str(isbns_13)])
)
setattr(edition, "isbn_13", isbns_13)
self.logger.info("\t".join([olid, str(isbns_10), str(isbns_13)]))
self.save(lambda: edition.save(comment=comment))


def dedupe(input_list: list) -> list:
"""Remove duplicate elements in a list and return the new list"""
output = []
Expand Down

0 comments on commit 5f6fc8f

Please sign in to comment.