wexample-wex-addon-dev-python 11.1.1__tar.gz → 11.2.0__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.
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/PKG-INFO +6 -6
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/README.md +3 -3
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/pyproject.toml +3 -3
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/file/python_pyproject_toml_file.py +6 -12
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/refactor/python_package_rename_handler.py +14 -9
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/workdir/python_workdir.py +4 -6
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/__pycache__/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/check/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/check/mypy.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/check/pylint.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/check/pyright.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/check.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/format/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/format/black.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/format/isort.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/format.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/code/rename.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/examples/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/examples/utils/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/examples/utils/some_example_type.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/examples/validate.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/commands/release/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/common/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/common/pypi_registry_gateway.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/config_value/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/config_value/__pycache__/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/config_value/python_package_readme_config_value.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/const/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/const/__pycache__/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/const/package.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/const/python.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/const/tags.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/file/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/file/__pycache__/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/file/python_app_iml_file.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/helpers/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/helpers/pdm.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/middleware/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/middleware/__pycache__/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/middleware/each_python_file_middleware.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/py.typed +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/python_addon_manager.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/refactor/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/refactor/symbol_kind.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/resources/.wex.yml +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/resources/docker/Dockerfile.python-profiling +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/resources/package_publish_gitlab.yml +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/resources/readme_templates/tests.md.j2 +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/selection/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/selection/abstract_python_code_selection.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/selection/python_code_performance_selection.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/app_service.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/commands/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/commands/service/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/commands/service/install.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/commands/service/setup.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/samples/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/samples/docker/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/samples/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/samples/docker/entrypoint.sh +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/samples/docker/images/Dockerfile.base +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/samples/docker/images/Dockerfile.develop +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/samples/docker/images/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/services/python/service.yml +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/workdir/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/workdir/__pycache__/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/workdir/mixin/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/workdir/mixin/with_profiling_python_workdir_mixin.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/workdir/python_package_workdir.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/src/wexample_wex_addon_dev_python/workdir/python_packages_suite_workdir.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/tests/helpers/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/tests/helpers/test_pdm.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/tests/unit/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/tests/unit/helpers/__init__.py +0 -0
- {wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/tests/unit/helpers/test_pdm.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wexample-wex-addon-dev-python
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.2.0
|
|
4
4
|
Summary: Python dev addon for wex
|
|
5
5
|
Author-Email: weeger <contact@wexample.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,8 +17,8 @@ Requires-Dist: pylint
|
|
|
17
17
|
Requires-Dist: pyright
|
|
18
18
|
Requires-Dist: wexample-api>=6.6.0
|
|
19
19
|
Requires-Dist: wexample-filestate-python>=8.2.0
|
|
20
|
-
Requires-Dist: wexample-wex-addon-ai>=11.
|
|
21
|
-
Requires-Dist: wexample-wex-addon-app>=
|
|
20
|
+
Requires-Dist: wexample-wex-addon-ai>=11.2.0
|
|
21
|
+
Requires-Dist: wexample-wex-addon-app>=26.0.0
|
|
22
22
|
Provides-Extra: dev
|
|
23
23
|
Requires-Dist: pytest; extra == "dev"
|
|
24
24
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
@@ -26,7 +26,7 @@ Description-Content-Type: text/markdown
|
|
|
26
26
|
|
|
27
27
|
# wex_addon_dev_python
|
|
28
28
|
|
|
29
|
-
Version: 11.
|
|
29
|
+
Version: 11.2.0
|
|
30
30
|
|
|
31
31
|
Python dev addon for wex
|
|
32
32
|
|
|
@@ -114,8 +114,8 @@ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the comp
|
|
|
114
114
|
- pyright:
|
|
115
115
|
- wexample-api: >=6.6.0
|
|
116
116
|
- wexample-filestate-python: >=8.2.0
|
|
117
|
-
- wexample-wex-addon-ai: >=11.
|
|
118
|
-
- wexample-wex-addon-app: >=
|
|
117
|
+
- wexample-wex-addon-ai: >=11.2.0
|
|
118
|
+
- wexample-wex-addon-app: >=26.0.0
|
|
119
119
|
|
|
120
120
|
## Versioning & Compatibility Policy
|
|
121
121
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# wex_addon_dev_python
|
|
2
2
|
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.2.0
|
|
4
4
|
|
|
5
5
|
Python dev addon for wex
|
|
6
6
|
|
|
@@ -88,8 +88,8 @@ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the comp
|
|
|
88
88
|
- pyright:
|
|
89
89
|
- wexample-api: >=6.6.0
|
|
90
90
|
- wexample-filestate-python: >=8.2.0
|
|
91
|
-
- wexample-wex-addon-ai: >=11.
|
|
92
|
-
- wexample-wex-addon-app: >=
|
|
91
|
+
- wexample-wex-addon-ai: >=11.2.0
|
|
92
|
+
- wexample-wex-addon-app: >=26.0.0
|
|
93
93
|
|
|
94
94
|
## Versioning & Compatibility Policy
|
|
95
95
|
|
{wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/pyproject.toml
RENAMED
|
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "wexample-wex-addon-dev-python"
|
|
9
|
-
version = "11.
|
|
9
|
+
version = "11.2.0"
|
|
10
10
|
description = "Python dev addon for wex"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "weeger", email = "contact@wexample.com" },
|
|
@@ -26,8 +26,8 @@ dependencies = [
|
|
|
26
26
|
"pyright",
|
|
27
27
|
"wexample-api>=6.6.0",
|
|
28
28
|
"wexample-filestate-python>=8.2.0",
|
|
29
|
-
"wexample-wex-addon-ai>=11.
|
|
30
|
-
"wexample-wex-addon-app>=
|
|
29
|
+
"wexample-wex-addon-ai>=11.2.0",
|
|
30
|
+
"wexample-wex-addon-app>=26.0.0",
|
|
31
31
|
]
|
|
32
32
|
|
|
33
33
|
[project.readme]
|
|
@@ -111,13 +111,10 @@ class PythonPyprojectTomlFile(AppDependenciesConfigFileMixin, TomlFile):
|
|
|
111
111
|
|
|
112
112
|
deps = self._get_deps_array(optional=optional, group=group)
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
req
|
|
117
|
-
|
|
118
|
-
map[canonicalize_name(req.name)] = str(req.specifier)
|
|
119
|
-
|
|
120
|
-
return map
|
|
114
|
+
return {
|
|
115
|
+
canonicalize_name(req.name): str(req.specifier)
|
|
116
|
+
for req in (Requirement(spec) for spec in deps)
|
|
117
|
+
}
|
|
121
118
|
|
|
122
119
|
def optional_group_array(self, group: str):
|
|
123
120
|
"""Ensure and return project.optional-dependencies[group] as multi-line array."""
|
|
@@ -398,13 +395,10 @@ class PythonPyprojectTomlFile(AppDependenciesConfigFileMixin, TomlFile):
|
|
|
398
395
|
"""Reorder dictionary keys according to the specified order.
|
|
399
396
|
Keys not in key_order will appear after ordered keys in their original order.
|
|
400
397
|
"""
|
|
401
|
-
# Get all existing keys
|
|
402
|
-
existing_keys = list(d.keys())
|
|
403
|
-
|
|
404
398
|
# Build the new order: ordered keys first, then remaining keys
|
|
405
399
|
key_order_set = frozenset(key_order)
|
|
406
|
-
ordered_keys = [k for k in key_order if k in
|
|
407
|
-
remaining_keys = [k for k in
|
|
400
|
+
ordered_keys = [k for k in key_order if k in d]
|
|
401
|
+
remaining_keys = [k for k in d if k not in key_order_set]
|
|
408
402
|
new_order = ordered_keys + remaining_keys
|
|
409
403
|
|
|
410
404
|
# Reorder by removing and re-adding in the desired order
|
|
@@ -91,7 +91,7 @@ class PythonPackageRenameHandler:
|
|
|
91
91
|
n = len(self._source_parts) # hoisted: avoid recomputing per candidate
|
|
92
92
|
matches: list[Path] = []
|
|
93
93
|
for init_file in self.workdir_path.rglob("__init__.py"):
|
|
94
|
-
if any(part in _SKIP_DIR_NAMES for part in init_file.parts):
|
|
94
|
+
if any(part in _SKIP_DIR_NAMES for part in init_file.parent.parts): # skip filename "__init__.py"
|
|
95
95
|
continue
|
|
96
96
|
pkg_dir = init_file.parent
|
|
97
97
|
if len(pkg_dir.parts) < n:
|
|
@@ -138,15 +138,15 @@ class PythonPackageRenameHandler:
|
|
|
138
138
|
while stack:
|
|
139
139
|
current = stack.pop()
|
|
140
140
|
try:
|
|
141
|
-
|
|
141
|
+
# Iterate the OS generator directly — avoids a list allocation per dir.
|
|
142
|
+
for entry in current.iterdir():
|
|
143
|
+
if entry.is_dir():
|
|
144
|
+
if entry.name not in _SKIP_DIR_NAMES:
|
|
145
|
+
stack.append(entry)
|
|
146
|
+
elif entry.suffix == ".py":
|
|
147
|
+
yield entry
|
|
142
148
|
except (PermissionError, FileNotFoundError):
|
|
143
149
|
continue
|
|
144
|
-
for entry in entries:
|
|
145
|
-
if entry.is_dir():
|
|
146
|
-
if entry.name not in _SKIP_DIR_NAMES:
|
|
147
|
-
stack.append(entry)
|
|
148
|
-
elif entry.suffix == ".py":
|
|
149
|
-
yield entry
|
|
150
150
|
|
|
151
151
|
def _rewrite_imports(self, py_file: Path) -> str | None:
|
|
152
152
|
"""Return rewritten source, or None when no import touched this file."""
|
|
@@ -174,6 +174,7 @@ class _ImportRenameTransformer(cst.CSTTransformer):
|
|
|
174
174
|
self.old_parts = old_parts
|
|
175
175
|
self.new_parts = new_parts
|
|
176
176
|
self._n = len(old_parts) # cached: avoid repeated len() + attr-lookup
|
|
177
|
+
self._old_parts_0 = old_parts[0] # fast first-element guard in _starts_with
|
|
177
178
|
self.changed = False
|
|
178
179
|
|
|
179
180
|
def leave_Import(
|
|
@@ -212,4 +213,8 @@ class _ImportRenameTransformer(cst.CSTTransformer):
|
|
|
212
213
|
return updated_node.with_changes(module=_parts_to_dotted(new_parts))
|
|
213
214
|
|
|
214
215
|
def _starts_with(self, parts: tuple[str, ...]) -> bool:
|
|
215
|
-
return
|
|
216
|
+
return (
|
|
217
|
+
len(parts) >= self._n
|
|
218
|
+
and parts[0] == self._old_parts_0 # fast guard: avoid slice alloc on mismatch
|
|
219
|
+
and parts[: self._n] == self.old_parts
|
|
220
|
+
)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import re
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
from typing import TYPE_CHECKING
|
|
5
6
|
|
|
@@ -29,6 +30,8 @@ from wexample_wex_addon_dev_python.const.python import (
|
|
|
29
30
|
PYTHON_PYTEST_COV_REPORT_DIR,
|
|
30
31
|
)
|
|
31
32
|
from wexample_wex_addon_dev_python.file.python_app_iml_file import PythonAppImlFile
|
|
33
|
+
|
|
34
|
+
_RE_TEST_DEF = re.compile(r"^\s*(?:async )?def test_", re.MULTILINE)
|
|
32
35
|
from wexample_wex_addon_dev_python.workdir.mixin.with_profiling_python_workdir_mixin import (
|
|
33
36
|
WithProfilingPythonWorkdirMixin,
|
|
34
37
|
)
|
|
@@ -83,16 +86,13 @@ class PythonWorkdir(
|
|
|
83
86
|
return venv_path
|
|
84
87
|
|
|
85
88
|
def count_tests(self) -> int:
|
|
86
|
-
import re
|
|
87
|
-
|
|
88
89
|
tests_path = self.get_path() / "tests"
|
|
89
90
|
if not tests_path.is_dir():
|
|
90
91
|
return 0
|
|
91
92
|
|
|
92
|
-
pattern = re.compile(r"^\s*(?:async )?def test_", re.MULTILINE)
|
|
93
93
|
count = 0
|
|
94
94
|
for file in tests_path.rglob("test_*.py"):
|
|
95
|
-
count += len(
|
|
95
|
+
count += len(_RE_TEST_DEF.findall(file.read_text()))
|
|
96
96
|
return count
|
|
97
97
|
|
|
98
98
|
def get_app_config_file(self, reload: bool = True) -> PythonPyprojectTomlFile:
|
|
@@ -580,8 +580,6 @@ class PythonWorkdir(
|
|
|
580
580
|
# relationship — the static dict identity is what `SidecarOfOption`
|
|
581
581
|
# resolves on).
|
|
582
582
|
def _entry_filter(entry):
|
|
583
|
-
if not exclude_dirs:
|
|
584
|
-
return True
|
|
585
583
|
return not any(
|
|
586
584
|
segment in exclude_dirs for segment in entry.parent.parts
|
|
587
585
|
)
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
{wexample_wex_addon_dev_python-11.1.1 → wexample_wex_addon_dev_python-11.2.0}/tests/unit/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|