From cb514374abe479c2bf1925a96b2e6eccc3e3bc5e Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 21:14:55 +0000 Subject: [PATCH] refactor: remove unnecessary parentheses after keyword Extra parentheses in code can be removed for improved readability. In the examples below, the first example is more readable than the second one. --- src/plugins/nonebot_plugin_githubcard/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/nonebot_plugin_githubcard/__init__.py b/src/plugins/nonebot_plugin_githubcard/__init__.py index 0c70848..877db33 100644 --- a/src/plugins/nonebot_plugin_githubcard/__init__.py +++ b/src/plugins/nonebot_plugin_githubcard/__init__.py @@ -28,6 +28,6 @@ def match_link_parts(link): async def github_handle(bot: Bot, event: GroupMessageEvent, state: T_State): url = match_link_parts(event.get_plaintext()) imageUrl = await get_github_reposity_information(url) - if (imageUrl == "获取信息失败"): + if imageUrl == "获取信息失败": raise AssertionError await github.send(MessageSegment.image(imageUrl))