MCPcopy Index your code
hub / github.com/python/cpython / group

Function group

Platforms/Apple/__main__.py:223–239  ·  view source on GitHub ↗

A context manager that outputs a log marker around a section of a build. If running in a GitHub Actions environment, the GitHub syntax for collapsible log sections is used.

(text: str)

Source from the content-addressed store, hash-verified

221
222@contextmanager
223def group(text: str):
224 """A context manager that outputs a log marker around a section of a build.
225
226 If running in a GitHub Actions environment, the GitHub syntax for
227 collapsible log sections is used.
228 """
229 if "GITHUB_ACTIONS" in os.environ:
230 print(f"::group::{text}")
231 else:
232 print(f"===== {text} " + "=" * (70 - len(text)))
233
234 yield
235
236 if "GITHUB_ACTIONS" in os.environ:
237 print("::endgroup::")
238 else:
239 print()
240
241
242@contextmanager

Callers 6

configure_build_pythonFunction · 0.70
make_build_pythonFunction · 0.70
configure_host_pythonFunction · 0.70
make_host_pythonFunction · 0.70
packageFunction · 0.70
testFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…