mirror of
https://github.com/ldericher/fftcgtool
synced 2025-01-15 06:53:00 +00:00
"replace" clearup
This commit is contained in:
parent
f5d7e7dedf
commit
6c25f0d8f4
2 changed files with 4 additions and 4 deletions
|
@ -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({
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue