Krita Source Code Documentation
Loading...
Searching...
No Matches
debuggerformatter.py
Go to the documentation of this file.
1
"""
2
SPDX-FileCopyrightText: 2017 Eliakin Costa <eliakim170@gmail.com>
3
4
SPDX-License-Identifier: GPL-2.0-or-later
5
"""
6
import
re
7
import
inspect
8
9
10
def
format_data
(data):
11
globals()[
'types'
] = __import__(
'types'
)
12
13
exclude_keys = [
'copyright'
,
'credits'
,
'False'
,
14
'True'
,
'None'
,
'Ellipsis'
,
'quit'
,
15
'QtCriticalMsg'
,
'krita_path'
,
16
'QtWarningMsg'
,
'QWIDGETSIZE_MAX'
,
17
'QtFatalMsg'
,
'PYQT_CONFIGURATION'
,
18
'on_load'
,
'PYQT_VERSION'
,
'on_pykrita_unloading'
,
19
'on_unload'
,
'QT_VERSION'
,
'QtInfoMsg'
,
20
'PYQT_VERSION_STR'
,
'qApp'
,
'QtSystemMsg'
,
21
'QtDebugMsg'
,
'on_pykrita_loaded'
,
'QT_VERSION_STR'
]
22
exclude_valuetypes = [types.BuiltinFunctionType,
23
types.BuiltinMethodType,
24
types.ModuleType,
25
types.FunctionType]
26
27
return
[{k: {
'value'
: str(v),
'type'
: str(type(v))}}
for
k, v
in
data.items()
if
not
(k
in
exclude_keys
or
28
type(v)
in
exclude_valuetypes
or
29
re.search(
r'^(__).*\1$'
, k)
or
30
inspect.isclass(v)
or
31
inspect.isfunction(v))]
scripter.debugger_scripter.debuggerformatter.format_data
format_data(data)
Definition
debuggerformatter.py:10
plugins
python
scripter
debugger_scripter
debuggerformatter.py
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52