You are viewing an older version (9.3.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.3.0 / IPython / utils / sysinfo / pkg_commit_hash

function

IPython.utils.sysinfo:pkg_commit_hash

source: /IPython/utils/sysinfo.py :32

Signature

def   pkg_commit_hash ( pkg_path : str )  →  tuple[str, str]

Summary

Get short form of commit hash given directory pkg_path

Extended Summary

We get the commit hash from (in order of preference):

  • IPython.utils._sysinfo.commit

  • git output, if we are in a git repository

If these fail, we return a not-found placeholder tuple

Parameters

pkg_path : str

directory containing package only used for getting commit from active repo

Returns

hash_from : str

Where we got the hash from - description

hash_str : str

short form of hash

Aliases

  • IPython.utils.sysinfo.pkg_commit_hash