From abc2ac07efe6b2d45a211c6f10cc068b30092b98 Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Fri, 28 Jun 2024 06:10:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20ruff=20auto=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/migrations/9cd1647db502_merge_old_db.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nonebot_plugin_tetris_stats/config/migrations/9cd1647db502_merge_old_db.py b/nonebot_plugin_tetris_stats/config/migrations/9cd1647db502_merge_old_db.py index 1b7e2a2..a2cf09e 100644 --- a/nonebot_plugin_tetris_stats/config/migrations/9cd1647db502_merge_old_db.py +++ b/nonebot_plugin_tetris_stats/config/migrations/9cd1647db502_merge_old_db.py @@ -37,14 +37,10 @@ def migrate_old_data(connection: Connection) -> None: Bind = Base.classes.nonebot_plugin_tetris_stats_bind # noqa: N806 def non_empty(obj: str) -> bool: - if obj != '' and not obj.isspace(): - return True - return False + return bool(obj != '' and not obj.isspace()) def is_int(obj: int | str) -> bool: - if isinstance(obj, int) or obj.isdigit(): - return True - return False + return bool(isinstance(obj, int) or obj.isdigit()) bind_list = [ Bind(chat_platform='OneBot V11', chat_account=int(row.QQ), game_platform='IO', game_account=row.USER)