BackwardCompatibleVersionScanner

class chango.concrete.BackwardCompatibleVersionScanner(scanners)

Bases: VersionScanner

An Implementation of the VersionScanner interface that wraps multiple other implementations of VersionScanner. The purpose of this class is to ease transition between different version note formats in a project.

Warning

This assumes that the versions available for each of the scanners are mutually exclusive, i.e. no two scanners can return the same version.

Tip

Use together with BackwardCompatibleChanGo.

Parameters:

scanners (Collection[VersionScanner]) – The scanners to wrap.

get_latest_version()

Implementation of chango.abc.VersionScanner.get_latest_version().

Important

The newest version is determined by the date of the version, not the order in which the scanners were passed to the constructor.

Returns:

The latest version

Return type:

Version

lookup_change_note(uid)

Lookup a change note with the given identifier.

Parameters:

uid (str) – The unique identifier or file name of the change note to lookup

Returns:

The metadata about the change note specifying the file

path and version it belongs to.

Return type:

chango.ChangeNoteInfo