VersionTuple¶
-
class
lsst.daf.butler.registry.interfaces.
VersionTuple
¶ Bases:
tuple
Class representing a version number.
Parameters: - major, minor, patch :
int
Version number components
Attributes Summary
major
Alias for field number 0 minor
Alias for field number 1 patch
Alias for field number 2 Methods Summary
count
($self, value, /)Return number of occurrences of value. fromString
(versionStr)Extract version number from a string. index
($self, value[, start, stop])Return first index of value. Attributes Documentation
-
major
¶ Alias for field number 0
-
minor
¶ Alias for field number 1
-
patch
¶ Alias for field number 2
Methods Documentation
-
count
($self, value, /)¶ Return number of occurrences of value.
-
classmethod
fromString
(versionStr: str) → lsst.daf.butler.registry.interfaces._versioning.VersionTuple¶ Extract version number from a string.
Parameters: - versionStr :
str
Version number in string form “X.Y.Z”, all components must be present.
Returns: - version :
VersionTuple
Parsed version tuple.
Raises: - ValueError
Raised if string has an invalid format.
- versionStr :
-
index
($self, value, start=0, stop=sys.maxsize, /)¶ Return first index of value.
Raises ValueError if the value is not present.
- major, minor, patch :