diff options
author | Lint Action <[email protected]> | 2022-02-18 15:06:55 +0000 |
---|---|---|
committer | Lint Action <[email protected]> | 2022-02-18 15:06:55 +0000 |
commit | 8e938dc1314d3e90530911e96ee199788b972622 (patch) | |
tree | 9b8b6716417fbf275b43efe52457704b5a40b79a | |
parent | 774d9362282513ddd0cd3fbeaf8f46f4ba452053 (diff) | |
download | ATRI-8e938dc1314d3e90530911e96ee199788b972622.tar.gz ATRI-8e938dc1314d3e90530911e96ee199788b972622.tar.bz2 ATRI-8e938dc1314d3e90530911e96ee199788b972622.zip |
:rotating_light: 自动进行代码格式化
-rw-r--r-- | ATRI/plugins/help/data_source.py | 15 | ||||
-rw-r--r-- | test/test_plugin_help.py | 12 |
2 files changed, 23 insertions, 4 deletions
diff --git a/ATRI/plugins/help/data_source.py b/ATRI/plugins/help/data_source.py index da9432a..f96d59e 100644 --- a/ATRI/plugins/help/data_source.py +++ b/ATRI/plugins/help/data_source.py @@ -63,8 +63,19 @@ class Helper(Service): f = os.path.join(SERVICES_DIR, f) with open(f, "r", encoding="utf-8") as r: service = json.load(r) - services.append([prefix, "√" if service["enabled"] else "×", "√" if service["only_admin"] else "×"]) - table = tabulate(services, headers=["服务名称", "开启状态", "仅支持管理员"], tablefmt="plain", showindex=True) + services.append( + [ + prefix, + "√" if service["enabled"] else "×", + "√" if service["only_admin"] else "×", + ] + ) + table = tabulate( + services, + headers=["服务名称", "开启状态", "仅支持管理员"], + tablefmt="plain", + showindex=True, + ) repo = f"咱搭载了以下服务~\n{table}\n@bot 帮助 [服务] -以查看对应服务帮助" return repo diff --git a/test/test_plugin_help.py b/test/test_plugin_help.py index 7bc0cf3..82a0467 100644 --- a/test/test_plugin_help.py +++ b/test/test_plugin_help.py @@ -79,8 +79,16 @@ async def test_service_list(app: App): f = os.path.join(SERVICES_DIR, f) with open(f, "r", encoding="utf-8") as r: service = json.load(r) - services.append([prefix, "√" if service["enabled"] else "×", "√" if service["only_admin"] else "×"]) - table = tabulate(services, headers=["服务名称", "开启状态", "仅支持管理员"], tablefmt="plain", showindex=True) + services.append( + [ + prefix, + "√" if service["enabled"] else "×", + "√" if service["only_admin"] else "×", + ] + ) + table = tabulate( + services, headers=["服务名称", "开启状态", "仅支持管理员"], tablefmt="plain", showindex=True + ) output = f"咱搭载了以下服务~\n{table}\n@bot 帮助 [服务] -以查看对应服务帮助" Message = make_fake_message() |