1
0
Fork 0
mirror of https://github.com/ldericher/fftcgtool synced 2025-01-15 15:02:59 +00:00

"replace" clearup

This commit is contained in:
Jörn-Michael Miehe 2021-09-13 02:29:53 +02:00
parent f5d7e7dedf
commit 6c25f0d8f4
2 changed files with 4 additions and 4 deletions

View file

@ -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({

View file

@ -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