ExtensionVersions¶
- class hugr.ext.ExtensionVersions(latest: Extension)[source]¶
Bases:
objectSet of versions of an extension.
Older versions of an extension may be kept for backwards compatibility.
Methods
Add an extension to the set, coalescing compatible older versions.
Get the highest registered extension compatible with
version.Attributes
Get the ID of the extension.
Get latest version of the extension.
Get all versions of the extension.
- add(extension: Extension) None[source]¶
Add an extension to the set, coalescing compatible older versions.
- get_compatible(version: Version) Extension[source]¶
Get the highest registered extension compatible with
version.
- property id: ExtensionId¶
Get the ID of the extension.