mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-10-18 18:41:41 -07:00
forgetest: the workflow_steps docstring says which list items the stray-quote rule reads
The docstring said a key with one stray quote as the first key of any list item makes every step count as no step. The parser reads a step's first key on its dash line and a list item outside a step, such as a matrix entry, and does not read a list inside a step's body, so a stray quote there leaves the step counted. The docstring now says so, as the Testing page does. Proof: forgetest-ci "Unit tests" step, test_manifest.py: 39 tests OK on the committed tree (python -B -m unittest discover -s tests -p test_manifest.py). pyflakes: clean. Coverage lint on the tree manifest: 0 uncovered, 0 empty, 0 host-tested row problems, 43 tests. The change is a docstring; no case changes. Acceptance: none; forgetest is dev-only and manifest.py is in no catalog fingerprint.
This commit is contained in:
@@ -541,9 +541,10 @@ def workflow_steps(text):
|
||||
Anything outside a step (a trigger's paths, a job's name) is not a
|
||||
step. A key with one stray quote (`if":`, `"run:`) at the top level,
|
||||
at a job's name or a job's key, at a step's key, or as the first key of
|
||||
any list item (a step's first key is on its dash line: `- run": make`)
|
||||
is no key the lint reads: every step of the workflow then carries
|
||||
"unread" and counts as no step."""
|
||||
a list item outside a step (a step's first key is on its dash line,
|
||||
`- run": make`; a matrix entry is such an item; a list inside a step's
|
||||
body is not read) is no key the lint reads: every step of the workflow
|
||||
then carries "unread" and counts as no step."""
|
||||
lines = _lines(text)
|
||||
steps, i = [], 0
|
||||
in_jobs, job_at, key_at, job = False, None, None, None
|
||||
|
||||
Reference in New Issue
Block a user