MCPcopy Create free account
hub / github.com/apache/burr / _get_version_from_file

Function _get_version_from_file

scripts/apache_release.py:200–207  ·  view source on GitHub ↗

Extract version from pyproject.toml.

(file_path: str)

Source from the content-addressed store, hash-verified

198
199
200def _get_version_from_file(file_path: str) -> str:
201 """Extract version from pyproject.toml."""
202 with open(file_path, encoding="utf-8") as f:
203 content = f.read()
204 match = re.search(VERSION_PATTERN, content)
205 if match:
206 return match.group(1)
207 _fail(f"Could not find version in {file_path}")
208
209
210def _validate_version(requested_version: str) -> bool:

Callers 1

_validate_versionFunction · 0.85

Calls 1

_failFunction · 0.70

Tested by

no test coverage detected