module extras.code_editor.highlighters.python
Global Variables
- TYPE_CHECKING
- PYQT6
- PYQT5
- PYSIDE2
- PYSIDE6
- STYLES
function format
format(color, style='')
Return a QTextCharFormat with the given attributes.
function get_style
get_style(kind)
class PythonHighlighter
method PythonHighlighter.__init__
__init__(document)
method PythonHighlighter.build_rules
build_rules()
method PythonHighlighter.highlightBlock
highlightBlock(text)
Apply syntax highlighting to the given block of text.
method PythonHighlighter.match_multiline
match_multiline(text, delimiter, in_state, style)
Do highlighting of multi-line strings. delimiter should be a QRegularExpression for triple-single-quotes or triple-double-quotes, and in_state should be a unique integer to represent the corresponding state changes when inside those strings. Returns True if we're still inside a multi-line string when this function is finished.
This file was automatically generated via lazydocs.