MCPcopy Create free account
hub / github.com/numpy/numpy / init_version

Function init_version

numpy/_build_utils/gitversion.py:6–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def init_version():
7 init = os.path.join(os.path.dirname(__file__), '../../pyproject.toml')
8 with open(init) as fid:
9 data = fid.readlines()
10
11 version_line = next(
12 line for line in data if line.startswith('version =')
13 )
14
15 version = version_line.strip().split(' = ')[1]
16 version = version.replace('"', '').replace("'", '')
17
18 return version
19
20
21def git_version(version):

Callers 1

gitversion.pyFile · 0.85

Calls 7

openFunction · 0.85
startswithMethod · 0.80
stripMethod · 0.80
replaceMethod · 0.80
nextFunction · 0.50
joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected