MCPcopy
hub / github.com/ray-project/ray / find_version

Function find_version

python/setup.py:56–62  ·  view source on GitHub ↗
(*filepath)

Source from the content-addressed store, hash-verified

54
55
56def find_version(*filepath):
57 # Extract version information from filepath
58 with open(os.path.join(ROOT_DIR, *filepath)) as fp:
59 version_match = re.search(r"^version = ['\"]([^'\"]*)['\"]", fp.read(), re.M)
60 if version_match:
61 return version_match.group(1)
62 raise RuntimeError("Unable to find version string.")
63
64
65class SetupType(Enum):

Callers 2

conf.pyFile · 0.90
__init__Method · 0.85

Calls 4

openFunction · 0.85
groupMethod · 0.80
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…