mirror of
https://github.com/ldericher/fftcgtool
synced 2025-01-15 15:02:59 +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 logging
|
||||||
import os
|
import os
|
||||||
from dataclasses import replace
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class Book:
|
||||||
# set card indices
|
# set card indices
|
||||||
for i, card in enumerate(page_cards):
|
for i, card in enumerate(page_cards):
|
||||||
card.index = i
|
card.index = i
|
||||||
card[language] = replace(card[language], face=file_name)
|
card[language] = dataclasses.replace(card[language], face=file_name)
|
||||||
|
|
||||||
# save page
|
# save page
|
||||||
self.__pages.append({
|
self.__pages.append({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import dataclasses
|
||||||
import logging
|
import logging
|
||||||
from dataclasses import replace
|
|
||||||
from typing import Callable, Iterable
|
from typing import Callable, Iterable
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
@ -75,7 +75,7 @@ class Opus(Cards):
|
||||||
for card in self:
|
for card in self:
|
||||||
try:
|
try:
|
||||||
for lang in API_LANGS:
|
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:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue