Skip to content

Commit

Permalink
chore: 修改 open 函数的参数类型描述
Browse files Browse the repository at this point in the history
  • Loading branch information
weinibuliu committed Dec 4, 2024
1 parent 96f5550 commit b5d426e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions source/binding/Python/maa/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
import ctypes.util
import pathlib
import platform
from typing import Optional, Union

from .define import *


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.")

Expand All @@ -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()
Expand Down

0 comments on commit b5d426e

Please sign in to comment.