semantic_release.version.declarations.i_version_replacer module¶
- class semantic_release.version.declarations.i_version_replacer.IVersionReplacer[source]¶
Bases:
object
Interface for subclasses that replace a version string in a source file.
Methods generally have a base implementation are implemented here but likely just provide a not-supported message but return gracefully
This class cannot be instantiated directly but must be inherited from and implement the designated abstract methods.
- abstract parse() set[Version] [source]¶
Return a set of the versions which can be parsed from the file. Because a source can match in multiple places, this method returns a set of matches. Generally, there should only be one element in this set (i.e. even if the version is specified in multiple places, it should be the same version in each place), but enforcing that condition is not mandatory or expected.