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
パターンが無効だった場合、この文字列には分析エラーが含まれます。
isValid
: bool
Property
パターンが有効だった場合、Trueに設定されます。 無効だった場合、Falseに設定されます。
pattern
: str
Property
このパターンオブジェクトの構築に使用するソース文字列。