Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/figures/make_row_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ def _produce_fresh_report() -> dict:
repo_src + os.pathsep + env["PYTHONPATH"] if env.get("PYTHONPATH") else repo_src
)
with tempfile.TemporaryDirectory() as workdir:
subprocess.run( # noqa: S602 -- fixed, repo-owned script; same command the README documents
block,
shell=True,
# bash is invoked directly rather than through a shell: the block is repo-owned,
# but shell=True propagates the caller's shell settings for no benefit here, and
# -euo pipefail matches exactly how CI's quickstart job runs the same block.
subprocess.run( # noqa: S603 -- argv is literal but for `block`, read from this
# repo's own README at the commit being generated; there is no external input.
["/bin/bash", "-euo", "pipefail", "-c", block],
cwd=workdir,
check=True,
capture_output=True,
text=True,
executable="/bin/bash",
env=env,
)
return json.loads((Path(workdir) / "report.json").read_text(encoding="utf-8"))
Expand Down