From b5d426e559166af709eaab61fcaf1df349a725de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E7=95=99?= Date: Wed, 4 Dec 2024 18:31:30 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9=20open=20=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/binding/Python/maa/library.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/binding/Python/maa/library.py b/source/binding/Python/maa/library.py index 0426c0a9a..99cacd548 100644 --- a/source/binding/Python/maa/library.py +++ b/source/binding/Python/maa/library.py @@ -2,7 +2,6 @@ import ctypes.util import pathlib import platform -from typing import Optional, Union from .define import * @@ -10,7 +9,7 @@ class Library: @staticmethod - def open(path: Union[pathlib.Path, str]): + def open(path: pathlib.Path): if not pathlib.Path(path).exists(): raise FileNotFoundError(f"`{path}` does not exist.") @@ -32,9 +31,7 @@ def open(path: Union[pathlib.Path, str]): ) Library.framework = lib_import(str(Library.framework_libpath)) - Library.toolkit_libpath = ( - pathlib.Path(path) / platform_values[platform_type][1] - ) + Library.toolkit_libpath = pathlib.Path(path) / platform_values[platform_type][1] Library.toolkit = lib_import(str(Library.toolkit_libpath)) Library._set_api_properties()