diff --git a/pywxdump/wx_info/get_wx_db.py b/pywxdump/wx_info/get_wx_db.py index cd0190e..fbd80b3 100644 --- a/pywxdump/wx_info/get_wx_db.py +++ b/pywxdump/wx_info/get_wx_db.py @@ -8,9 +8,9 @@ import os import re import winreg +from typing import List, Union - -def get_wechat_db(require_list: [list | str] = "all", msg_dir: str = None): +def get_wechat_db(require_list: Union[List[str], str] = "all", msg_dir: str = None): if not msg_dir: try: key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Tencent\WeChat", 0, winreg.KEY_READ) diff --git a/setup.py b/setup.py index 1d4a7a7..234b00a 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() -version = "2.1.5" +version = "2.1.6" setup( name="pywxdump", author="xaoyaoo", diff --git a/tests/t2.py b/tests/t2.py index 9680892..0e819a0 100644 --- a/tests/t2.py +++ b/tests/t2.py @@ -5,3 +5,6 @@ # Author: xaoyaoo # Date: 2023/10/21 # ------------------------------------------------------------------------------- +from pywxdump import get_wechat_db +user_dirs = get_wechat_db(require_list=["MediaMSG", "MicroMsg", "FTSMSG", "MSG", "Sns", "Emotion"]) +print(user_dirs) \ No newline at end of file