MCPcopy
hub / github.com/PyQt5/PyQt / __init__

Method __init__

Demo/TestSerializeModel.py:35–44  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

33
34class JsonHighlighter(QSyntaxHighlighter):
35 def __init__(self, *args, **kwargs):
36 super().__init__(*args, **kwargs)
37 self._rules = [
38 # numbers
39 HighlightingRule(QRegExp('([-0-9.]+)(?!([^"]*"[\\s]*\\:))'), Qt.darkRed),
40 # key
41 HighlightingRule(QRegExp('("[^"]*")\\s*\\:'), Qt.darkBlue),
42 # value
43 HighlightingRule(QRegExp(':+(?:[: []*)("[^"]*")'), Qt.darkGreen),
44 ]
45
46 def highlightBlock(self, text: str) -> None:
47 for rule in self._rules:

Callers

nothing calls this directly

Calls 2

HighlightingRuleClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected