Skip to content

Commit

Permalink
🎨 makes ruff happy
Browse files Browse the repository at this point in the history
  • Loading branch information
MuelNova committed Jul 20, 2024
1 parent eec537f commit 8e04c8f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion arknights_mower/model/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from typing import Any, Literal, Optional
from typing import Literal, Optional

import yaml
from pydantic import (
Expand Down
46 changes: 25 additions & 21 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,18 +353,20 @@ def get_report_data():
earliest_date = str2date(data[0]["Unnamed: 0"])

for item in data:
format_data.append({
"日期": date2str(
str2date(item["Unnamed: 0"]) - datetime.timedelta(days=1)
),
"作战录像": item["作战录像"],
"赤金": item["赤金"],
"制造总数": int(item["赤金"] + item["作战录像"]),
"龙门币订单": item["龙门币订单"],
"反向作战录像": -item["作战录像"],
"龙门币订单数": item["龙门币订单数"],
"每单获取龙门币": int(item["龙门币订单"] / item["龙门币订单数"]),
})
format_data.append(
{
"日期": date2str(
str2date(item["Unnamed: 0"]) - datetime.timedelta(days=1)
),
"作战录像": item["作战录像"],
"赤金": item["赤金"],
"制造总数": int(item["赤金"] + item["作战录像"]),
"龙门币订单": item["龙门币订单"],
"反向作战录像": -item["作战录像"],
"龙门币订单数": item["龙门币订单数"],
"每单获取龙门币": int(item["龙门币订单"] / item["龙门币订单数"]),
}
)

if len(format_data) < 15:
for i in range(1, 16 - len(format_data)):
Expand Down Expand Up @@ -420,15 +422,17 @@ def get_orundum_data():
total_orundum = 0
for item in data:
total_orundum = total_orundum + item["合成玉"]
format_data.append({
"日期": date2str(
str2date(item["Unnamed: 0"]) - datetime.timedelta(days=1)
),
"合成玉": item["合成玉"],
"合成玉订单数量": item["合成玉订单数量"],
"抽数": round((item["合成玉"] / 600), 1),
"累计制造合成玉": total_orundum,
})
format_data.append(
{
"日期": date2str(
str2date(item["Unnamed: 0"]) - datetime.timedelta(days=1)
),
"合成玉": item["合成玉"],
"合成玉订单数量": item["合成玉订单数量"],
"抽数": round((item["合成玉"] / 600), 1),
"累计制造合成玉": total_orundum,
}
)

if len(format_data) < 15:
earliest_date = str2date(data[0]["Unnamed: 0"])
Expand Down

0 comments on commit 8e04c8f

Please sign in to comment.