pyqt-code-editor 0.0.20__tar.gz → 0.0.21__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.20 → pyqt_code_editor-0.0.21}/PKG-INFO +1 -1
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/__init__.py +1 -1
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/_settings.py +1 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/app.py +5 -5
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/languages/python.py +1 -1
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/project_explorer.py +10 -2
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/comment.py +21 -2
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/COPYING +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyproject.toml +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/code_editors.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/languages/markdown.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/languages/text.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/editor_panel.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/find_in_files.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/jupyter_console.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/settings_panel.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/sigmund.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/workspace_explorer.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/auto_indent.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/auto_pair.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/base.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/check.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/complete.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/execute.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/file_link.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/line_number.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/python_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/search_replace.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/shortcuts.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/smart_backspace_delete.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/symbols.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/theme.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/zoom.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/signal_router.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/syntax_highlighters/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/syntax_highlighters/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/syntax_highlighters/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/syntax_highlighters/languages/python.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/syntax_highlighters/syntax_highlighter.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/themes.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/utils/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/utils/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/utils/languages/python/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/utils/languages/python/_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/utils/languages/python/_extract_cells.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/utils/languages/python/_mask_str_in_code.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/watchdog.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/calltip_widget.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/completion_popup.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/dock.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/quick_open_dialog.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/quick_open_file_dialog.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/quick_symbol_dialog.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/search_replace_frame.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/tab_splitter.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/tabbed_editor.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/languages/python.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/manager.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/process.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/__init__.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/codestral.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/jedi.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/ruff.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/sigmund.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/symbol.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/settings.py +0 -0
- {pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/readme.md +0 -0
|
@@ -80,6 +80,7 @@ class Settings(QObject):
|
|
|
80
80
|
|
|
81
81
|
# Files and Folders
|
|
82
82
|
current_folder = SettingProperty(os.path.expanduser('~'), "Files")
|
|
83
|
+
project_folders = SettingProperty(os.path.expanduser('~'), "Files")
|
|
83
84
|
default_filename = SettingProperty('untitled.txt', "Files")
|
|
84
85
|
default_language = SettingProperty('python', "Files")
|
|
85
86
|
default_encoding = SettingProperty('utf-8', "Files")
|
|
@@ -26,9 +26,8 @@ class MainWindow(QMainWindow):
|
|
|
26
26
|
super().__init__()
|
|
27
27
|
logger.info("MainWindow initialized")
|
|
28
28
|
# If no path is provided, fall back to current dir
|
|
29
|
-
if
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
if root_path:
|
|
30
|
+
settings.project_folders = settings.current_folder = root_path
|
|
32
31
|
self.setWindowTitle(f"Sigmund Analyst {__version__}")
|
|
33
32
|
# The editor panel provides splittable editor tabs
|
|
34
33
|
self._editor_panel = EditorPanel()
|
|
@@ -38,8 +37,9 @@ class MainWindow(QMainWindow):
|
|
|
38
37
|
# Track if project explorers are hidden as a group
|
|
39
38
|
self._project_explorers_hidden = False
|
|
40
39
|
# Open initial project explorer
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
for project_folder in str(settings.project_folders).split(':'):
|
|
41
|
+
if project_folder:
|
|
42
|
+
self._open_project_explorer(project_folder)
|
|
43
43
|
# Set up the workspace explorer
|
|
44
44
|
self._workspace_explorer = WorkspaceExplorer(parent=self)
|
|
45
45
|
self.addDockWidget(Qt.RightDockWidgetArea, self._workspace_explorer)
|
|
@@ -6,7 +6,7 @@ from pyqt_code_editor.mixins import Complete, PythonAutoIndent, \
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Editor(LineNumber, Zoom, SmartBackspaceDelete, PythonAutoPair, Complete,
|
|
9
|
-
|
|
9
|
+
Comment, PythonAutoIndent, SearchReplace, FileLink, Execute,
|
|
10
10
|
Theme, Check, Shortcuts, Symbols, Base,
|
|
11
11
|
QPlainTextEdit):
|
|
12
12
|
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/project_explorer.py
RENAMED
|
@@ -262,8 +262,12 @@ class ProjectExplorer(QDockWidget):
|
|
|
262
262
|
if not selected_dir:
|
|
263
263
|
return None
|
|
264
264
|
settings.current_folder = selected_dir
|
|
265
|
+
# Add selected folder to project folders but make sure we don't
|
|
266
|
+
# duplicate
|
|
267
|
+
settings.project_folders = ':'.join(
|
|
268
|
+
set(str(settings.project_folders).split(':')) | {selected_dir})
|
|
265
269
|
explorer = cls(editor_panel, root_path=selected_dir, parent=parent)
|
|
266
|
-
return explorer
|
|
270
|
+
return explorer
|
|
267
271
|
|
|
268
272
|
def _toggle_gitignore(self, enabled):
|
|
269
273
|
"""Toggles the .gitignore filter on or off and refreshes the model.
|
|
@@ -514,6 +518,10 @@ class ProjectExplorer(QDockWidget):
|
|
|
514
518
|
self._clipboard_operation = None
|
|
515
519
|
self._clipboard_source_path = None
|
|
516
520
|
|
|
517
|
-
def closeEvent(self, event):
|
|
521
|
+
def closeEvent(self, event):
|
|
522
|
+
# Add selected folder to project folders but make sure we don't
|
|
523
|
+
# duplicate
|
|
524
|
+
settings.project_folders = ':'.join(
|
|
525
|
+
set(str(settings.project_folders).split(':')) - {self._display_root})
|
|
518
526
|
super().closeEvent(event)
|
|
519
527
|
self.closed.emit(self)
|
|
@@ -17,12 +17,31 @@ class Comment:
|
|
|
17
17
|
(default "# " for Python).
|
|
18
18
|
"""
|
|
19
19
|
super().__init__(*args, **kwargs)
|
|
20
|
-
# The text to prepend for a commented line
|
|
21
|
-
self.code_editor_comment_string
|
|
22
20
|
self._comment_shortcut = QShortcut(
|
|
23
21
|
QKeySequence(settings.shortcut_comment), self)
|
|
24
22
|
self._comment_shortcut.setContext(Qt.WidgetWithChildrenShortcut)
|
|
25
23
|
self._comment_shortcut.activated.connect(self._toggle_comment)
|
|
24
|
+
|
|
25
|
+
def keyPressEvent(self, event):
|
|
26
|
+
# When a return is pressed on a commented line, the comment should
|
|
27
|
+
# continue on the next line
|
|
28
|
+
if event.key() in (Qt.Key_Enter, Qt.Key_Return):
|
|
29
|
+
cursor = self.textCursor()
|
|
30
|
+
block = cursor.block()
|
|
31
|
+
line_text = block.text()
|
|
32
|
+
# Check if the current line is a comment
|
|
33
|
+
stripped = line_text.lstrip()
|
|
34
|
+
if stripped.startswith(self.code_editor_comment_string[0]):
|
|
35
|
+
# Extract the indentation from the current line
|
|
36
|
+
indentation = line_text[:len(line_text) - len(stripped)]
|
|
37
|
+
# Insert newline with same indentation plus comment marker
|
|
38
|
+
cursor.beginEditBlock()
|
|
39
|
+
cursor.insertText(
|
|
40
|
+
'\n' + indentation + self.code_editor_comment_string)
|
|
41
|
+
cursor.endEditBlock()
|
|
42
|
+
event.accept()
|
|
43
|
+
return
|
|
44
|
+
super().keyPressEvent(event)
|
|
26
45
|
|
|
27
46
|
def _toggle_comment(self):
|
|
28
47
|
"""Toggle comment on the current selection or current line."""
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/code_editors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/code_editors/languages/text.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/editor_panel.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/find_in_files.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/components/jupyter_console.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/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
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/python_auto_indent.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/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.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/mixins/widgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/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
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/utils/languages/__init__.py
RENAMED
|
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.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/calltip_widget.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/completion_popup.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/quick_open_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/quick_symbol_dialog.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/search_replace_frame.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/tab_splitter.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/widgets/tabbed_editor.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/languages/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/languages/generic.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/languages/python.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/codestral.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/jedi.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/ruff.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/sigmund.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.20 → pyqt_code_editor-0.0.21}/pyqt_code_editor/worker/providers/symbol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|