ver Feb28th
a new multi app task --- init a web extension project with web tool
This commit is contained in:
@@ -587,7 +587,7 @@ def _match_value_to_rule(value: V, rule: Dict[str, Union[str, V]]) -> bool:
|
||||
bool
|
||||
"""
|
||||
|
||||
if rule["method"].startswith("re"):
|
||||
if rule["method"].startswith("re"): # re.FLAGs
|
||||
flags: List[str] = rule["method"].split(".")[1:]
|
||||
flags: Iterable[re.RegexFlag] = (getattr(re, fl) for fl in flags)
|
||||
flag: re.RegexFlag = functools.reduce(operator.or_, flags, re.RegexFlag(0))
|
||||
@@ -600,7 +600,7 @@ def _match_value_to_rule(value: V, rule: Dict[str, Union[str, V]]) -> bool:
|
||||
, "ge", "gt"
|
||||
}:
|
||||
return getattr(operator, rule["method"])(value, rule["ref"])
|
||||
if rule["method"].startswith("approx"):
|
||||
if rule["method"].startswith("approx"): # approx:THRESHOLD
|
||||
threshold: float = float(rule["method"].split(":")[1])
|
||||
logger.debug("Approx: TH%f, REF%f, VAL%s", threshold, rule["ref"], repr(value))
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user