checks.version.VersionCheck

checks.version.VersionCheck()

Check that version in code matches pyproject.toml version.

Methods

Name Description
run Compare version in code with pyproject.toml version.

run

checks.version.VersionCheck.run(package_path, config)

Compare version in code with pyproject.toml version.

ERROR only for two literal versions that differ. A project with nothing to compare is SKIPPED. The reason is “prerequisite-failed” when the metadata check reports what is missing (pyproject.toml, its [project] table or a static version), “parse-failed” when the file that should hold __version__ could not be parsed, and “not-applicable” for a dynamic version, no importable module, no __version__ or a __version__ that is set at run time or is not a string.