Code StyleΒΆ
Formatting, typing, and import conventions moved to
.github/CONTRIBUTING.md; the NumPy docstring
convention moved to .github/WRITING.md. This page keeps
the one runnable example that used to live here, because it is collected as
a test under docs/ β moving it into .github/ would stop it running.
>>> def fetch(url: str, *, branch: str | None = None) -> str:
... """Fetch a remote branch.
...
... Parameters
... ----------
... url : str
... Repository URL.
... branch : str or None
... Branch name. ``None`` means the default branch.
...
... Returns
... -------
... str
... The fetched commit hash.
... """
... return "abc123"