taotoolkit 2.0.2__tar.gz → 2.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/PKG-INFO +2 -2
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/pyproject.toml +2 -2
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/__init__.py +1 -1
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/tao_common.py +16 -5
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit.egg-info/PKG-INFO +2 -2
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit.egg-info/requires.txt +1 -1
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/README.md +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/setup.cfg +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/asrVrf.py +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/tao_camDvt.py +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/tao_cmdTool.py +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/tao_device.py +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/tao_flash.py +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/tao_tuning.py +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit/tao_vrfTool.py +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit.egg-info/SOURCES.txt +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit.egg-info/dependency_links.txt +0 -0
- {taotoolkit-2.0.2 → taotoolkit-2.0.3}/taotoolkit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: taotoolkit
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: Tao ToolKit
|
|
5
5
|
Author-email: taotaoli <taotaoli@asrmicro.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,7 +19,7 @@ Requires-Dist: beautifulsoup4>=4.10.0
|
|
|
19
19
|
Requires-Dist: pyyaml>=6.0.3
|
|
20
20
|
Requires-Dist: pywinpty>=3.0.5; platform_system == "Windows"
|
|
21
21
|
Provides-Extra: uiautomator
|
|
22
|
-
Requires-Dist: uiautomator2>=2.0.
|
|
22
|
+
Requires-Dist: uiautomator2>=2.0.3; extra == "uiautomator"
|
|
23
23
|
|
|
24
24
|
# TAO - Toolkit
|
|
25
25
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "taotoolkit"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.3"
|
|
8
8
|
description = "Tao ToolKit"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -29,5 +29,5 @@ dependencies = [
|
|
|
29
29
|
|
|
30
30
|
[project.optional-dependencies]
|
|
31
31
|
uiautomator = [
|
|
32
|
-
"uiautomator2>=2.0.
|
|
32
|
+
"uiautomator2>=2.0.3",
|
|
33
33
|
]
|
|
@@ -10,7 +10,7 @@ import time
|
|
|
10
10
|
import atexit
|
|
11
11
|
from functools import wraps
|
|
12
12
|
from datetime import datetime
|
|
13
|
-
from typing import Callable, Dict, List, Optional, Any
|
|
13
|
+
from typing import Callable, Dict, List, Optional, Any, Union, Iterable
|
|
14
14
|
from colorama import Back, Fore, Style, init
|
|
15
15
|
|
|
16
16
|
try:
|
|
@@ -217,20 +217,31 @@ def fileExist(path: str) -> bool:
|
|
|
217
217
|
return os.path.exists(path)
|
|
218
218
|
|
|
219
219
|
|
|
220
|
-
def
|
|
220
|
+
def _normalizeSuffixes(suffix: Union[str, Iterable[str]]) -> tuple:
|
|
221
|
+
"""将单个后缀或后缀集合统一为 tuple, 供 str.endswith 使用。"""
|
|
222
|
+
if isinstance(suffix, str):
|
|
223
|
+
return (suffix,)
|
|
224
|
+
return tuple(suffix)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def findFilesBySuffixKeyword(path: str, suffix: Union[str, Iterable[str]], keyword: str) -> List[str]:
|
|
228
|
+
"""递归查找以指定后缀结尾(支持1个及以上后缀)且文件名包含关键字的文件。"""
|
|
229
|
+
suffixes = _normalizeSuffixes(suffix)
|
|
221
230
|
result = []
|
|
222
231
|
for root, _dirs, files in os.walk(path):
|
|
223
232
|
for f in files:
|
|
224
|
-
if f.endswith(
|
|
233
|
+
if f.endswith(suffixes) and keyword in f:
|
|
225
234
|
result.append(os.path.join(root, f))
|
|
226
235
|
return result
|
|
227
236
|
|
|
228
237
|
|
|
229
|
-
def findFilesWithSuffix(path: str, suffix: str) -> List[str]:
|
|
238
|
+
def findFilesWithSuffix(path: str, suffix: Union[str, Iterable[str]]) -> List[str]:
|
|
239
|
+
"""递归查找以指定后缀结尾的文件, 支持1个及以上后缀。"""
|
|
240
|
+
suffixes = _normalizeSuffixes(suffix)
|
|
230
241
|
result = []
|
|
231
242
|
for root, _dirs, files in os.walk(path):
|
|
232
243
|
for f in files:
|
|
233
|
-
if f.endswith(
|
|
244
|
+
if f.endswith(suffixes):
|
|
234
245
|
result.append(os.path.join(root, f))
|
|
235
246
|
return result
|
|
236
247
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: taotoolkit
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: Tao ToolKit
|
|
5
5
|
Author-email: taotaoli <taotaoli@asrmicro.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,7 +19,7 @@ Requires-Dist: beautifulsoup4>=4.10.0
|
|
|
19
19
|
Requires-Dist: pyyaml>=6.0.3
|
|
20
20
|
Requires-Dist: pywinpty>=3.0.5; platform_system == "Windows"
|
|
21
21
|
Provides-Extra: uiautomator
|
|
22
|
-
Requires-Dist: uiautomator2>=2.0.
|
|
22
|
+
Requires-Dist: uiautomator2>=2.0.3; extra == "uiautomator"
|
|
23
23
|
|
|
24
24
|
# TAO - Toolkit
|
|
25
25
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|