From e0b25986b19a833ee50e6c6a2c4fc748ac3aae12 Mon Sep 17 00:00:00 2001 From: baiqwerdvd <158065462+baiqwerdvd@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:13:34 +0800 Subject: [PATCH] bump to 1.9.6 --- pyproject.toml | 2 +- starrail_damage_cal/to_data.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3cf90db..5a20073 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "starrail_damage_cal" -version = "1.9.5" +version = "1.9.6" description = "For StarRail Role Damage Cal" authors = [ {name = "qwerdvd", email = "105906879+qwerdvd@users.noreply.github.com"}, diff --git a/starrail_damage_cal/to_data.py b/starrail_damage_cal/to_data.py index 6430a3c..9a14e4f 100644 --- a/starrail_damage_cal/to_data.py +++ b/starrail_damage_cal/to_data.py @@ -1,4 +1,3 @@ -import json from pathlib import Path from typing import Dict, List, Tuple, Union @@ -375,10 +374,7 @@ async def get_data( if save_path: path = save_path / str(uid) path.mkdir(parents=True, exist_ok=True) - path.mkdir(parents=True, exist_ok=True) - with Path.open( - path / f"{char_data.avatarName}.json", "wb", encoding="UTF-8" - ) as file: + with Path.open(path / f"{char_data.avatarName}.json", "wb") as file: _ = file.write(msgjson.encode(char_data)) return char_data, char_data.avatarName