chartflow 0.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chartflow-0.1 → chartflow-0.1.2}/PKG-INFO +1 -1
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/__init__.py +119 -119
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/code_editor.py +192 -127
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/completer.py +2991 -2652
- chartflow-0.1.2/chartflow/edit/minimap.py +45 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/python_editor.py +10 -68
- chartflow-0.1.2/chartflow/edit/qcompletion.py +769 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/test_editor.py +190 -190
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/qchart.py +13 -3
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/_node_base.py +61 -8
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/_node_interface.py +6 -2
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/_node_ports.py +8 -4
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/arrow_item.py +106 -26
- chartflow-0.1.2/chartflow/node/connection_item.py +1413 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/demo_ports.py +69 -69
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/node_canvas.py +623 -39
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/node_item.py +103 -29
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/popmenu.py +5 -5
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/port_item.py +92 -25
- chartflow-0.1.2/chartflow/node/qnode_editor.py +140 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/style_panel.py +89 -38
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/styles.py +11 -1
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/test_qnode.py +2383 -2336
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/showcase.py +605 -528
- {chartflow-0.1 → chartflow-0.1.2}/chartflow.egg-info/PKG-INFO +1 -1
- {chartflow-0.1 → chartflow-0.1.2}/chartflow.egg-info/SOURCES.txt +1 -0
- {chartflow-0.1 → chartflow-0.1.2}/setup.py +1 -1
- chartflow-0.1/chartflow/edit/minimap.py +0 -581
- chartflow-0.1/chartflow/node/connection_item.py +0 -939
- chartflow-0.1/chartflow/node/qnode_editor.py +0 -73
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/__init__.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/_verify_importexport.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/code_folder.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/context_analyzer.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/demo.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/line_number_area.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/edit/syntax_highlighter.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/__init__.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/_demo.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/chart.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/editor.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/flow.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/test/__init__.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/test/test_chart.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/flow/test_decorator_sync.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/__init__.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/decorators.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/demo.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/demo_pyqt6.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/demo_tree.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/logic.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/meta.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/scheduler.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/stage.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/stdio.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/__init__.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_decorators.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_events.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_integration.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_logic.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_meta.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_runtime_param.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_scheduler.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test/test_stage.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test_behavior_events.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test_nested_parallel.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/test_stage_spec.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/fsm/utils.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/__init__.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/_node_interaction.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/_node_markers.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/_port_interface.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/color_utils.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/demo.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/demo_arrow_drag.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/demo_decorator.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/enums.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/example.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/layout_utils.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/main_window.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/menu_bar.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/node/selection_rect.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow/theme.py +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow.egg-info/dependency_links.txt +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow.egg-info/requires.txt +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/chartflow.egg-info/top_level.txt +0 -0
- {chartflow-0.1 → chartflow-0.1.2}/setup.cfg +0 -0
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
"""
|
|
2
|
-
PyEdit - Python代码编辑器模块
|
|
3
|
-
|
|
4
|
-
基于PyQt6和Python 3.12的高级Python代码编辑器
|
|
5
|
-
|
|
6
|
-
功能特性:
|
|
7
|
-
- Python语法高亮(浅色主题)
|
|
8
|
-
- 智能代码补全(类似PyCharm)
|
|
9
|
-
- 上下文分析(支持隐藏的上下文代码)
|
|
10
|
-
- 代码折叠(Ctrl++ / Ctrl+-)
|
|
11
|
-
- 行号显示
|
|
12
|
-
- 缩略图滑块
|
|
13
|
-
|
|
14
|
-
使用示例:
|
|
15
|
-
from chartflow.edit import PythonEditor
|
|
16
|
-
|
|
17
|
-
editor = PythonEditor()
|
|
18
|
-
|
|
19
|
-
# 设置上下文代码(隐藏但参与分析)
|
|
20
|
-
editor.set_context_code(
|
|
21
|
-
code_a="class A(CL):\\n NAME = ''\\n ...",
|
|
22
|
-
code_b="def myfn(self, c:OuterClassRef, k: KnowRef, *refs):\\n v = 0",
|
|
23
|
-
prefix=" "
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
# 设置编辑器中的代码
|
|
27
|
-
editor.set_code("self.do_something()")
|
|
28
|
-
|
|
29
|
-
# 获取代码
|
|
30
|
-
code = editor.get_code()
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
__version__ = '1.0.0'
|
|
34
|
-
__author__ = 'PyEdit Team'
|
|
35
|
-
|
|
36
|
-
# 主要组件
|
|
37
|
-
from .python_editor import (
|
|
38
|
-
PythonEditor,
|
|
39
|
-
PythonEditorDialog,
|
|
40
|
-
PythonEditorFactory,
|
|
41
|
-
create_editor,
|
|
42
|
-
create_editor_with_context,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
from .code_editor import CodeEditor
|
|
46
|
-
from .syntax_highlighter import PythonSyntaxHighlighter
|
|
47
|
-
from .completer import (
|
|
48
|
-
CodeCompleter,
|
|
49
|
-
SmartCompleter,
|
|
50
|
-
CompletionItem,
|
|
51
|
-
CompletionWorker,
|
|
52
|
-
)
|
|
53
|
-
from .
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
)
|
|
70
|
-
from .
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
__all__ = [
|
|
78
|
-
# 主编辑器
|
|
79
|
-
'PythonEditor',
|
|
80
|
-
'PythonEditorDialog',
|
|
81
|
-
'PythonEditorFactory',
|
|
82
|
-
'create_editor',
|
|
83
|
-
'create_editor_with_context',
|
|
84
|
-
|
|
85
|
-
# 代码编辑器组件
|
|
86
|
-
'CodeEditor',
|
|
87
|
-
|
|
88
|
-
# 语法高亮
|
|
89
|
-
'PythonSyntaxHighlighter',
|
|
90
|
-
|
|
91
|
-
# 代码补全
|
|
92
|
-
'CodeCompleter',
|
|
93
|
-
'SmartCompleter',
|
|
94
|
-
'CompletionItem',
|
|
95
|
-
'CompletionWorker',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
'
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
'
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
'
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
'
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
'
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
'
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
'
|
|
119
|
-
]
|
|
1
|
+
"""
|
|
2
|
+
PyEdit - Python代码编辑器模块
|
|
3
|
+
|
|
4
|
+
基于PyQt6和Python 3.12的高级Python代码编辑器
|
|
5
|
+
|
|
6
|
+
功能特性:
|
|
7
|
+
- Python语法高亮(浅色主题)
|
|
8
|
+
- 智能代码补全(类似PyCharm)
|
|
9
|
+
- 上下文分析(支持隐藏的上下文代码)
|
|
10
|
+
- 代码折叠(Ctrl++ / Ctrl+-)
|
|
11
|
+
- 行号显示
|
|
12
|
+
- 缩略图滑块
|
|
13
|
+
|
|
14
|
+
使用示例:
|
|
15
|
+
from chartflow.edit import PythonEditor
|
|
16
|
+
|
|
17
|
+
editor = PythonEditor()
|
|
18
|
+
|
|
19
|
+
# 设置上下文代码(隐藏但参与分析)
|
|
20
|
+
editor.set_context_code(
|
|
21
|
+
code_a="class A(CL):\\n NAME = ''\\n ...",
|
|
22
|
+
code_b="def myfn(self, c:OuterClassRef, k: KnowRef, *refs):\\n v = 0",
|
|
23
|
+
prefix=" "
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# 设置编辑器中的代码
|
|
27
|
+
editor.set_code("self.do_something()")
|
|
28
|
+
|
|
29
|
+
# 获取代码
|
|
30
|
+
code = editor.get_code()
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
__version__ = '1.0.0'
|
|
34
|
+
__author__ = 'PyEdit Team'
|
|
35
|
+
|
|
36
|
+
# 主要组件
|
|
37
|
+
from .python_editor import (
|
|
38
|
+
PythonEditor,
|
|
39
|
+
PythonEditorDialog,
|
|
40
|
+
PythonEditorFactory,
|
|
41
|
+
create_editor,
|
|
42
|
+
create_editor_with_context,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
from .code_editor import CodeEditor
|
|
46
|
+
from .syntax_highlighter import PythonSyntaxHighlighter
|
|
47
|
+
from .completer import (
|
|
48
|
+
CodeCompleter,
|
|
49
|
+
SmartCompleter,
|
|
50
|
+
CompletionItem,
|
|
51
|
+
CompletionWorker,
|
|
52
|
+
)
|
|
53
|
+
from .qcompletion import (
|
|
54
|
+
QwebStyleCompleter,
|
|
55
|
+
CompletionPopup,
|
|
56
|
+
DocTooltip,
|
|
57
|
+
)
|
|
58
|
+
from .context_analyzer import (
|
|
59
|
+
ContextAnalyzer,
|
|
60
|
+
ContextInfo,
|
|
61
|
+
CodeContext,
|
|
62
|
+
ScopeAnalyzer,
|
|
63
|
+
)
|
|
64
|
+
from .code_folder import (
|
|
65
|
+
CodeFolder,
|
|
66
|
+
FoldRegion,
|
|
67
|
+
FoldMarkerPainter,
|
|
68
|
+
get_fold_indicator,
|
|
69
|
+
)
|
|
70
|
+
from .line_number_area import (
|
|
71
|
+
LineNumberArea,
|
|
72
|
+
LineNumberDelegate,
|
|
73
|
+
FoldingIndicator,
|
|
74
|
+
)
|
|
75
|
+
from .minimap import Minimap
|
|
76
|
+
|
|
77
|
+
__all__ = [
|
|
78
|
+
# 主编辑器
|
|
79
|
+
'PythonEditor',
|
|
80
|
+
'PythonEditorDialog',
|
|
81
|
+
'PythonEditorFactory',
|
|
82
|
+
'create_editor',
|
|
83
|
+
'create_editor_with_context',
|
|
84
|
+
|
|
85
|
+
# 代码编辑器组件
|
|
86
|
+
'CodeEditor',
|
|
87
|
+
|
|
88
|
+
# 语法高亮
|
|
89
|
+
'PythonSyntaxHighlighter',
|
|
90
|
+
|
|
91
|
+
# 代码补全
|
|
92
|
+
'CodeCompleter',
|
|
93
|
+
'SmartCompleter',
|
|
94
|
+
'CompletionItem',
|
|
95
|
+
'CompletionWorker',
|
|
96
|
+
'QwebStyleCompleter',
|
|
97
|
+
'CompletionPopup',
|
|
98
|
+
'DocTooltip',
|
|
99
|
+
|
|
100
|
+
# 上下文分析
|
|
101
|
+
'ContextAnalyzer',
|
|
102
|
+
'ContextInfo',
|
|
103
|
+
'CodeContext',
|
|
104
|
+
'ScopeAnalyzer',
|
|
105
|
+
|
|
106
|
+
# 代码折叠
|
|
107
|
+
'CodeFolder',
|
|
108
|
+
'FoldRegion',
|
|
109
|
+
'FoldMarkerPainter',
|
|
110
|
+
'get_fold_indicator',
|
|
111
|
+
|
|
112
|
+
# 行号
|
|
113
|
+
'LineNumberArea',
|
|
114
|
+
'LineNumberDelegate',
|
|
115
|
+
'FoldingIndicator',
|
|
116
|
+
|
|
117
|
+
# 缩略图
|
|
118
|
+
'Minimap',
|
|
119
|
+
]
|