DatasetTypeWildcard¶
- class lsst.daf.butler.registry.wildcards.DatasetTypeWildcard(values: ~collections.abc.Mapping[str, ~lsst.daf.butler._dataset_type.DatasetType | None] = <factory>, patterns: tuple[re.Pattern, ...] | ellipsis = Ellipsis)¶
Bases:
objectA validated expression that resolves to one or more dataset types.
The
from_expressionmethod should almost always be used to construct instances, as the regular constructor performs no checking of inputs (and that can lead to confusing error messages downstream).Attributes Summary
Regular expressions to be matched against dataset type names, or the special value
...indicating all dataset types.Methods Summary
from_expression(expression)Construct an instance by analyzing the given expression.
Attributes Documentation
- patterns: tuple[re.Pattern, ...] | ellipsis = Ellipsis¶
Regular expressions to be matched against dataset type names, or the special value
...indicating all dataset types.Any pattern matching a dataset type is considered an overall match for the expression.
Methods Documentation
- classmethod from_expression(expression: Any) DatasetTypeWildcard¶
Construct an instance by analyzing the given expression.
- Parameters:
- expression
Any Expression to analyze. May be any of the following:
a
strdataset type name;a
DatasetTypeinstance;an iterable whose elements may be any of the above (any dataset type matching any element in the list is an overall match);
an existing
DatasetTypeWildcardinstance;the special
...ellipsis object, which matches any dataset type.
- expression
- Returns:
- query
DatasetTypeWildcard An instance of this class (new unless an existing instance was passed in).
- query
- Raises:
- DatasetTypeExpressionError
Raised if the given expression does not have one of the allowed types.