|
| 1 | +diff --git a/ament_package/templates.py b/ament_package/templates.py |
| 2 | +index 41b0175..2db4fd5 100644 |
| 3 | +--- a/ament_package/templates.py |
| 4 | ++++ b/ament_package/templates.py |
| 5 | +@@ -13,18 +13,17 @@ |
| 6 | + # limitations under the License. |
| 7 | + |
| 8 | + from importlib import resources |
| 9 | +-from importlib.resources.abc import Traversable |
| 10 | + import os |
| 11 | + import re |
| 12 | + |
| 13 | + IS_WINDOWS = os.name == 'nt' |
| 14 | + |
| 15 | + |
| 16 | +-def _get_path(template: str, name: str) -> Traversable: |
| 17 | ++def _get_path(template: str, name: str): |
| 18 | + return resources.files(template).joinpath(name) |
| 19 | + |
| 20 | + |
| 21 | +-def get_environment_hook_template_path(name: str) -> Traversable: |
| 22 | ++def get_environment_hook_template_path(name: str): |
| 23 | + return _get_path('ament_package.template.environment_hook', name) |
| 24 | + |
| 25 | + |
| 26 | +@@ -41,7 +40,7 @@ def get_package_level_template_names(all_platforms: bool = False) -> list[str]: |
| 27 | + return names |
| 28 | + |
| 29 | + |
| 30 | +-def get_package_level_template_path(name: str) -> Traversable: |
| 31 | ++def get_package_level_template_path(name: str): |
| 32 | + return _get_path('ament_package.template.package_level', name) |
| 33 | + |
| 34 | + |
| 35 | +@@ -61,7 +60,7 @@ def get_prefix_level_template_names(*, all_platforms: bool = False) -> list[str] |
| 36 | + return names |
| 37 | + |
| 38 | + |
| 39 | +-def get_prefix_level_template_path(name: str) -> Traversable: |
| 40 | ++def get_prefix_level_template_path(name: str): |
| 41 | + return _get_path('ament_package.template.prefix_level', name) |
| 42 | + |
| 43 | + |
0 commit comments