pyqt-code-editor 0.0.14__tar.gz → 0.0.15__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.
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/PKG-INFO +1 -1
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/__init__.py +1 -1
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/app.py +1 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/python_auto_indent.py +9 -2
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/COPYING +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyproject.toml +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/_settings.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/code_editors.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/languages/markdown.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/languages/python.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/languages/text.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/editor_panel.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/find_in_files.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/jupyter_console.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/project_explorer.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/settings_panel.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/sigmund.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/workspace_explorer.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/auto_indent.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/auto_pair.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/base.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/check.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/comment.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/complete.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/execute.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/file_link.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/line_number.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/search_replace.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/shortcuts.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/smart_backspace_delete.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/symbols.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/theme.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/zoom.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/python_utils.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/signal_router.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/syntax_highlighters/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/syntax_highlighters/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/syntax_highlighters/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/syntax_highlighters/languages/python.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/syntax_highlighters/syntax_highlighter.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/themes.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/utils.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/watchdog.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/calltip_widget.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/completion_popup.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/dock.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/quick_open_dialog.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/quick_open_file_dialog.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/quick_symbol_dialog.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/search_replace_frame.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/tab_splitter.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/tabbed_editor.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/languages/python.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/manager.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/process.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/__init__.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/codestral.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/jedi.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/ruff.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/sigmund.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/symbol.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/settings.py +0 -0
- {pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/readme.md +0 -0
|
@@ -339,6 +339,7 @@ class MainWindow(QMainWindow):
|
|
|
339
339
|
self._jupyter_console.change_directory(
|
|
340
340
|
os.path.dirname(editor.code_editor_file_path)
|
|
341
341
|
)
|
|
342
|
+
self._toggle_dock_widget(self._jupyter_console, show=True)
|
|
342
343
|
self._jupyter_console.execute_code(code)
|
|
343
344
|
|
|
344
345
|
def _execute_file(self, path):
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/python_auto_indent.py
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from qtpy.QtCore import Qt
|
|
2
|
+
from qtpy.QtGui import QTextCursor
|
|
2
3
|
from .. import python_utils, settings
|
|
3
4
|
import logging
|
|
4
5
|
logging.basicConfig(level=logging.INFO, force=True)
|
|
@@ -50,7 +51,14 @@ class PythonAutoIndent:
|
|
|
50
51
|
logging.info("Enter/Return pressed")
|
|
51
52
|
cursor = self.textCursor()
|
|
52
53
|
cursor.beginEditBlock()
|
|
53
|
-
|
|
54
|
+
|
|
55
|
+
# Use QTextCursor to get text up to cursor position
|
|
56
|
+
# This handles UTF-16 encoding correctly
|
|
57
|
+
temp_cursor = self.textCursor()
|
|
58
|
+
temp_cursor.movePosition(QTextCursor.Start)
|
|
59
|
+
temp_cursor.setPosition(cursor.position(), QTextCursor.KeepAnchor)
|
|
60
|
+
code = temp_cursor.selectedText().replace('\u2029', '\n')
|
|
61
|
+
|
|
54
62
|
new_indent = python_utils.python_auto_indent(code)
|
|
55
63
|
# Insert the computed indentation
|
|
56
64
|
super().keyPressEvent(event)
|
|
@@ -60,7 +68,6 @@ class PythonAutoIndent:
|
|
|
60
68
|
cursor.endEditBlock()
|
|
61
69
|
self.setTextCursor(cursor)
|
|
62
70
|
return
|
|
63
|
-
|
|
64
71
|
# Otherwise, default behavior
|
|
65
72
|
super().keyPressEvent(event)
|
|
66
73
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/code_editors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/code_editors/languages/text.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/editor_panel.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/find_in_files.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/jupyter_console.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/project_explorer.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/components/settings_panel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/search_replace.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/mixins/widgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/syntax_highlighters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/calltip_widget.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/completion_popup.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/quick_open_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/quick_symbol_dialog.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/search_replace_frame.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/tab_splitter.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/widgets/tabbed_editor.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/languages/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/languages/generic.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/languages/python.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/codestral.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/jedi.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/ruff.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/sigmund.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.14 → pyqt_code_editor-0.0.15}/pyqt_code_editor/worker/providers/symbol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|