diff --git a/fftcgtool/book.py b/fftcgtool/book.py index df41a58..3695dae 100644 --- a/fftcgtool/book.py +++ b/fftcgtool/book.py @@ -1,6 +1,6 @@ +import dataclasses import logging import os -from dataclasses import replace from PIL import Image @@ -48,7 +48,7 @@ class Book: # set card indices for i, card in enumerate(page_cards): card.index = i - card[language] = replace(card[language], face=file_name) + card[language] = dataclasses.replace(card[language], face=file_name) # save page self.__pages.append({ diff --git a/fftcgtool/opus.py b/fftcgtool/opus.py index 534bcca..8221d40 100644 --- a/fftcgtool/opus.py +++ b/fftcgtool/opus.py @@ -1,5 +1,5 @@ +import dataclasses import logging -from dataclasses import replace from typing import Callable, Iterable import requests @@ -75,7 +75,7 @@ class Opus(Cards): for card in self: try: for lang in API_LANGS: - card[lang] = replace(card[lang], face=carddb[card.code][lang].face) + card[lang] = dataclasses.replace(card[lang], face=carddb[card.code][lang].face) except KeyError: pass