diff --git a/apps/code/variable_box_controller.cpp b/apps/code/variable_box_controller.cpp index 32091d200..e50b83b62 100644 --- a/apps/code/variable_box_controller.cpp +++ b/apps/code/variable_box_controller.cpp @@ -356,7 +356,6 @@ void VariableBoxController::insertTextInCaller(const char * text, int textLength void VariableBoxController::loadBuiltinNodes(const char * textToAutocomplete, int textToAutocompleteLength) { //TODO LEA could be great to use strings defined in STATIC const char *const tok_kw[] from python/lexer.c //TODO LEA Prune these (check all are usable in our Python, but just comment those which aren't -> there might become usable later) - //TODO LEA add matplotlib.pyplot static const struct { const char * name; ScriptNode::Type type; } builtinNames[] = { {"False", ScriptNode::Type::WithoutParentheses}, {"None", ScriptNode::Type::WithoutParentheses}, @@ -432,6 +431,7 @@ void VariableBoxController::loadBuiltinNodes(const char * textToAutocomplete, in {qstr_str(MP_QSTR_locals), ScriptNode::Type::WithParentheses}, {qstr_str(MP_QSTR_map), ScriptNode::Type::WithParentheses}, {qstr_str(MP_QSTR_math), ScriptNode::Type::WithoutParentheses}, + {qstr_str(MP_QSTR_matplotlib_dot_pyplot), ScriptNode::Type::WithoutParentheses}, {qstr_str(MP_QSTR_max), ScriptNode::Type::WithParentheses}, //{qstr_str(MP_QSTR_memoryview), ScriptNode::Type::WithParentheses}, {qstr_str(MP_QSTR_min), ScriptNode::Type::WithParentheses}, diff --git a/apps/code/variable_box_controller.h b/apps/code/variable_box_controller.h index 6efe0228d..ca59edcfc 100644 --- a/apps/code/variable_box_controller.h +++ b/apps/code/variable_box_controller.h @@ -42,7 +42,7 @@ private: constexpr static int k_maxScriptObjectNameSize = 100; //TODO LEA constexpr static int k_maxNumberOfDisplayedRows = 8; // (240 - titlebar - margin)/27 //TODO LEA constexpr static int k_maxScriptNodesCount = 32; //TODO LEA - constexpr static int k_totalBuiltinNodesCount = 107; + constexpr static int k_totalBuiltinNodesCount = 108; constexpr static uint8_t k_scriptOriginsCount = 3; constexpr static uint8_t k_subtitleCellType = NodeCellType; // We don't care as it is not selectable constexpr static uint8_t k_itemCellType = LeafCellType; // So that upper class NestedMenuController knows it's a leaf