__init__(self,
pattern,
msgpart,
hint=None,
valid=[ ] ,
stat=False,
casesens=True,
ident=None,
disabled=False,
manual=False,
environ=None,
mfilter=None,
rfilter=None,
trigger=None)
(Constructor)
|
|
Create a rule
- Parameters:
pattern (unicode) - valid regexp pattern that trigger the rule
msgpart (string) - part of the message to be matched by pattern
hint (unicode) - hint given to user when rule match
valid (list of unicode key=value) - list of cases that should make or not make rule matching
casesens (bool) - whether regex matching will be case-sensitive
ident (unicode or None ) - rule identifier
disabled (bool) - whether rule is disabled
manual (bool) - whether rule is manually applied
environ (string or None ) - environment in which the rule applies
mfilter ((msg, cat, envs) -> <anything>) - filter to apply to message before checking
rfilter ((string) -> string) - filter to apply to rule strings (e.g. on regex patterns)
trigger ((msg, cat, envs) -> highlight) - function to act as trigger instead of pattern
applied to msgpart
- Overrides:
object.__init__
|