Spaces:
Running
Running
Alejandro Cremades
commited on
Commit
·
8c4ec6e
1
Parent(s):
1c25ea2
Fix warnings
Browse files- Middle_School_Card_Search.py +3 -2
- streamlit_common/lib.py +1 -1
Middle_School_Card_Search.py
CHANGED
@@ -11,7 +11,7 @@ _ = streamlit_common.locale.get_locale()
|
|
11 |
def row_to_link(row: pd.DataFrame) -> None:
|
12 |
"""Prints a list item with a Scryfall link for the card in the row passed"""
|
13 |
cardname = row["name"]
|
14 |
-
if row.name_ja
|
15 |
cardname = f"{cardname} / {row.name_ja}"
|
16 |
link = f"[{cardname}]({row.link})"
|
17 |
if row.banned:
|
@@ -53,7 +53,8 @@ st.write(f'## {_["search"]["title"][l]}')
|
|
53 |
st.write(_["search"]["instructions"][l])
|
54 |
|
55 |
mslist_df = pd.read_csv(mslist_path)
|
56 |
-
mslist_df.fillna("", inplace=True)
|
|
|
57 |
st.write(
|
58 |
f'**{mslist_df[mslist_df["banned"]==False].shape[0]}**{_["search"]["cards_are_legal"][l]}'
|
59 |
)
|
|
|
11 |
def row_to_link(row: pd.DataFrame) -> None:
|
12 |
"""Prints a list item with a Scryfall link for the card in the row passed"""
|
13 |
cardname = row["name"]
|
14 |
+
if row.name_ja != "":
|
15 |
cardname = f"{cardname} / {row.name_ja}"
|
16 |
link = f"[{cardname}]({row.link})"
|
17 |
if row.banned:
|
|
|
53 |
st.write(_["search"]["instructions"][l])
|
54 |
|
55 |
mslist_df = pd.read_csv(mslist_path)
|
56 |
+
mslist_df["name_ja"].fillna("", inplace=True)
|
57 |
+
mslist_df["text"].fillna("", inplace=True)
|
58 |
st.write(
|
59 |
f'**{mslist_df[mslist_df["banned"]==False].shape[0]}**{_["search"]["cards_are_legal"][l]}'
|
60 |
)
|
streamlit_common/lib.py
CHANGED
@@ -12,7 +12,7 @@ def compose_scryfall_url(cardname: str) -> str:
|
|
12 |
def row_to_button_link(row: pd.DataFrame) -> None:
|
13 |
"""Prints a list item with a Scryfall link for the card in the row passed"""
|
14 |
cardname = row.English
|
15 |
-
if row.日本語
|
16 |
cardname = f"{cardname} / {row.日本語}"
|
17 |
st.write(f"- [{cardname}]({compose_scryfall_url(row.English)})")
|
18 |
|
|
|
12 |
def row_to_button_link(row: pd.DataFrame) -> None:
|
13 |
"""Prints a list item with a Scryfall link for the card in the row passed"""
|
14 |
cardname = row.English
|
15 |
+
if row.日本語 != "":
|
16 |
cardname = f"{cardname} / {row.日本語}"
|
17 |
st.write(f"- [{cardname}]({compose_scryfall_url(row.English)})")
|
18 |
|