Inheritance |
|
This class allows you to construct a pattern that can match work item attributes against a range of values.
Methods ¶
__init__(pattern)
Constructs a new pattern object from the specified pattern
string.
match(attribute, value, component=0, inclusive=False)
→ bool
Returns True
if the specified attribute and value matches the pattern. value
can be either an integer, float or string.
Patterns can reference specific attribute components, such as @scale.x>0.5
or @position[2]==4
. The component
argument to this functions specifies which component is being matched against the pattern.
If inclusive
is True
, endpoint values in ranges are included when matching the value
against a range. Otherwise, range endpoints are excluded.
match(work_item, inclusive=False)
→ bool
Returns True
is the attributes on the work_item
match the filter pattern. If inclusive
is True
, endpoint values in ranges are included when matching the value
against a range. Otherwise, rage endpoints are excluded.
Methods from pdg.BasePattern ¶
errors
: str
Property
If the pattern is invalid, this string contains the parse errors.
isValid
: bool
Property
Set to True if the pattern is valid, else False.
pattern
: str
Property
The source string used to construct this pattern object.