*: Switch away from config_types.Path.join()
Change-Id: I06f2c9c69f932249ef67f4a13dfd8492b09edd40
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/203810
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/recipe_modules/environment/api.py b/recipe_modules/environment/api.py
index 76e95c4..01a0c41 100644
--- a/recipe_modules/environment/api.py
+++ b/recipe_modules/environment/api.py
@@ -64,7 +64,7 @@
) -> config_types.Path:
parts = [x for x in relative_path.split('/') if x not in ('.', u'.')]
if parts:
- return checkout.root.join(*parts)
+ return checkout.root.joinpath(*parts)
else:
return checkout.root # pragma: no cover
diff --git a/recipe_modules/util/tests/full.py b/recipe_modules/util/tests/full.py
index 799441b..340c5c7 100644
--- a/recipe_modules/util/tests/full.py
+++ b/recipe_modules/util/tests/full.py
@@ -40,7 +40,7 @@
raise api.step.StepFailure('failure')
api.file.write_json(
'write metadata',
- api.path.start_dir.join('metadata.json'),
+ api.path.start_dir / 'metadata.json',
api.util.build_metadata(),
)
diff --git a/recipes/cipd_roller.py b/recipes/cipd_roller.py
index eeea815..14bf809 100644
--- a/recipes/cipd_roller.py
+++ b/recipes/cipd_roller.py
@@ -155,7 +155,7 @@
def process_package(api, checkout, pkg):
- json_path = checkout.root.join(*re.split(r'[\\/]+', pkg.json_path))
+ json_path = checkout.root.joinpath(*re.split(r'[\\/]+', pkg.json_path))
if not pkg.name:
# Turn foo/bar/baz/${platform} and foo/bar/baz/${os=mac}-${arch}
diff --git a/recipes/docs_builder.py b/recipes/docs_builder.py
index d6492e7..d77109f 100644
--- a/recipes/docs_builder.py
+++ b/recipes/docs_builder.py
@@ -74,7 +74,7 @@
assert False # pragma: no cover
html_path: str = props.html_path or 'docs/gen/docs/html'
- html: config_types.Path = out_dir.join(*html_path.split('/'))
+ html: config_types.Path = out_dir.joinpath(*html_path.split('/'))
applied_changes: Sequence[api.checkout.Change] = checkout.applied_changes()