Coverage for control/typ/cust/criteria.py : 88%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from config import Config as C, Names as N
2from control.utils import pick as G, E
3from control.html import HtmlElements as H
4from control.typ.value import Value
7CW = C.web
9Qq = H.icon(CW.unknown[N.generic], asChar=True)
12class Criteria(Value):
13 """Type class for criteria."""
15 def __init__(self, context):
16 super().__init__(context)
18 def titleStr(self, record, markup=True, **kwargs):
19 """The title is the short criterion text."""
21 valBare = G(record, N.criterion)
22 if markup is None: 22 ↛ 23line 22 didn't jump to line 23, because the condition on line 22 was never true
23 return valBare or E
25 return H.he(G(record, N.criterion)) or Qq