@@ -22,7 +22,10 @@ class PythonVariableSimpleNode(private val variable: LiveVariable) : SimpleNode(
22
22
23
23
override fun getChildren (): Array <SimpleNode > {
24
24
if (variable.liveClazz == " <class 'dict'>" ) {
25
- val dict = JsonObject ((variable.value as String ).replace(" '" , " \" " ))
25
+ val dict = JsonObject (
26
+ (variable.value as String ).replace(" '" , " \" " )
27
+ .replace(" : True" , " : true" ).replace(" : False" , " : false" )
28
+ )
26
29
val children = mutableListOf<SimpleNode >()
27
30
dict.map.forEach {
28
31
children.add(PythonVariableSimpleNode (LiveVariable (" '" + it.key + " '" , it.value)))
@@ -46,29 +49,29 @@ class PythonVariableSimpleNode(private val variable: LiveVariable) : SimpleNode(
46
49
)
47
50
}
48
51
49
- when (variable.liveClazz) {
50
- " <class 'dict '>" -> {
52
+ when {
53
+ variable.liveClazz == " <class 'int '>" || variable.value is Number -> {
51
54
presentation.addText(
52
55
variable.value.toString(),
53
- SimpleTextAttributes .fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors .IDENTIFIER ))
56
+ SimpleTextAttributes .fromTextAttributes(
57
+ scheme.getAttributes(DefaultLanguageHighlighterColors .NUMBER )
58
+ )
54
59
)
55
60
}
56
- " <class 'str'>" -> {
61
+ variable.liveClazz == " <class 'str'>" -> {
57
62
presentation.addText(
58
63
" \" " + variable.value + " \" " ,
59
- SimpleTextAttributes .fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors .STRING ))
60
- )
61
- }
62
- " <class 'NoneType'>" -> {
63
- presentation.addText(
64
- variable.value.toString(),
65
- SimpleTextAttributes .fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors .IDENTIFIER ))
64
+ SimpleTextAttributes .fromTextAttributes(
65
+ scheme.getAttributes(DefaultLanguageHighlighterColors .STRING )
66
+ )
66
67
)
67
68
}
68
69
else -> {
69
70
presentation.addText(
70
71
variable.value.toString(),
71
- SimpleTextAttributes .fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors .CONSTANT ))
72
+ SimpleTextAttributes .fromTextAttributes(
73
+ scheme.getAttributes(DefaultLanguageHighlighterColors .IDENTIFIER )
74
+ )
72
75
)
73
76
}
74
77
}
0 commit comments