Skip to content

topmark.version.types

topmark / version / types

Types for TopMark version reporting.

VersionFormatLiteral module-attribute

VersionFormatLiteral = Literal['pep440', 'semver']

Version identifier format.

VersionInfo dataclass

VersionInfo(*, version_text, version_format, err)

Prepared payload for topmark version (and the API equivalent).

VersionInfo is part of the stable API surface.

Attributes:

Name Type Description
version_text str

TopMark version text in the requested output format.

version_format VersionFormatLiteral

The format of version_text ("pep440" or "semver").

err Exception | None

Conversion error when semver=True and conversion fails. In that case version_text remains the original PEP 440 string and version_format is "pep440".