mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-08 04:55:51 +08:00
⬆️ pre-commit-ci
自动升级 (#670)
* ⬆️ `pre-commit-ci`自动升级 updates: - [github.com/pycqa/isort: 5.13.2 → 6.0.0](https://github.com/pycqa/isort/compare/5.13.2...6.0.0) - [github.com/psf/black: 24.10.0 → 25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0) * 🚨 `pre-commit-ci`修复格式错误 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
7670c42ff8
commit
346dbe7aa4
@ -8,12 +8,12 @@ ci:
|
||||
autoupdate_commit_msg: "⬆️ `pre-commit-ci`自动升级"
|
||||
repos:
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.13.2
|
||||
rev: 6.0.0
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.10.0
|
||||
rev: 25.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
|
@ -21,8 +21,11 @@ from ..utils.image.convert import convert_img
|
||||
from ..genshinuid_config.gs_config import gsconfig
|
||||
from ..genshinuid_enka.to_data import get_enka_info
|
||||
from ..utils.resource.download_url import download_file
|
||||
from ..utils.api.mys.models import FakeResin, DayilyTask
|
||||
from ..utils.api.mys.models import Expedition as WidgetExpedition
|
||||
from ..utils.api.mys.models import (
|
||||
FakeResin,
|
||||
DayilyTask,
|
||||
)
|
||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH, CHAR_SIDE_TEMP_PATH
|
||||
from ..utils.api.mys.models import (
|
||||
Transformer,
|
||||
|
@ -179,7 +179,7 @@ async def convert_exist_data_to_char(
|
||||
|
||||
|
||||
async def convert_ambr_to_weapon(
|
||||
weapon_id: Union[int, str]
|
||||
weapon_id: Union[int, str],
|
||||
) -> Optional[ConvertWeapon]:
|
||||
path = WEAPON_DATA_PATH / f'{weapon_id}.json'
|
||||
if path.exists():
|
||||
@ -256,7 +256,7 @@ async def convert_ambr_to_minigg(
|
||||
|
||||
|
||||
async def convert_ambr_to_talent(
|
||||
char_id: Union[str, int]
|
||||
char_id: Union[str, int],
|
||||
) -> Optional[CharacterTalents]:
|
||||
raw_data = await get_ambr_char_data(char_id)
|
||||
if raw_data is None:
|
||||
|
@ -4,6 +4,6 @@ from .ambr_to_minigg import ConvertWeapon
|
||||
|
||||
|
||||
async def convert_hakush_to_weapon(
|
||||
weapon_id: Union[int, str]
|
||||
weapon_id: Union[int, str],
|
||||
) -> Optional[ConvertWeapon]:
|
||||
return None
|
||||
|
@ -488,7 +488,7 @@ class CustomizeImage:
|
||||
|
||||
@staticmethod
|
||||
def get_char_high_color(
|
||||
bg_color: Tuple[int, int, int]
|
||||
bg_color: Tuple[int, int, int],
|
||||
) -> Tuple[int, int, int]:
|
||||
r = 140
|
||||
d = 20
|
||||
@ -503,7 +503,7 @@ class CustomizeImage:
|
||||
|
||||
@staticmethod
|
||||
def get_bg_detail_color(
|
||||
bg_color: Tuple[int, int, int]
|
||||
bg_color: Tuple[int, int, int],
|
||||
) -> Tuple[int, int, int]:
|
||||
r = 140
|
||||
if max(*bg_color) > 255 - r:
|
||||
@ -517,7 +517,7 @@ class CustomizeImage:
|
||||
|
||||
@staticmethod
|
||||
def get_highlight_color(
|
||||
color: Tuple[int, int, int]
|
||||
color: Tuple[int, int, int],
|
||||
) -> Tuple[int, int, int]:
|
||||
red_color = color[0]
|
||||
green_color = color[1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user