def get_current_version() -> Text:
    """Return the current library version as specified in the code."""

    if not version_file_path.is_file():
        raise FileNotFoundError(
            f"Failed to find version file at {version_file_path().absolute()}"
        )

    # context in which we evaluate the version py -
    # to be able to access the defined version, it already needs to live in the
    # context passed to exec
    _globals = {"__version__": ""}
    with open(version_file_path) as f:
        exec(f.read(), _globals)

    return _globals["__version__"]
Return the current library version as specified in the code.
scripts/validate_version.py