From bf378bdfbd549b301fea18262bf659c7ae072d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E5=B0=8F=E4=B8=98?= <49586948+Yuerchu@users.noreply.github.com> Date: Thu, 30 Jan 2025 12:36:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20notfound.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除 单测模式 --- notfound.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notfound.py b/notfound.py index 77a4a7c..9e75d8a 100644 --- a/notfound.py +++ b/notfound.py @@ -37,4 +37,7 @@ def create() -> None: ui.button('返回首页', on_click=lambda: ui.navigate.to('/')) \ - .classes('items-center w-full').props('rounded') \ No newline at end of file + .classes('items-center w-full').props('rounded') + +if __name__ not in {"__main__", "__mp_main__"}: + raise Exception('不支持单测模式,请从main.py启动') \ No newline at end of file