Skip to content

Commit 752bdb3

Browse files
committed
docs: fix reference to subkeys with a list
1 parent a448449 commit 752bdb3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/howto/resolve-keyed-by.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ Specifying the Subkey
163163
164164
The subkey in :func:`~taskgraph.util.schema.resolve_keyed_by` is expressed in
165165
dot path notation with each part of the path representing a nested dictionary.
166-
If any part of the subkey is a list, each item in the list will be operated on.
167-
For example, consider this excerpt of a task definition:
166+
If any part of the subkey is a list, you can use `[]` to operate on each item
167+
in the list. For example, consider this excerpt of a task definition:
168168
169169
.. code-block:: yaml
170170
@@ -188,7 +188,7 @@ With the associated transform:
188188
@transforms.add
189189
def resolve_artifact_paths(config, tasks):
190190
for task in tasks:
191-
resolve_keyed_by(task, "worker.artifacts.path", task["label"])
191+
resolve_keyed_by(task, "worker.artifacts[].path", task["label"])
192192
yield task
193193
194194
In this example, Taskgraph resolves ``by-platform`` in both the *foo* and *bar*

0 commit comments

Comments
 (0)