pyqt-code-editor 0.0.10__tar.gz → 0.0.12__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.10 → pyqt_code_editor-0.0.12}/PKG-INFO +1 -1
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/__init__.py +1 -1
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/find_in_files.py +3 -3
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/project_explorer.py +5 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/base.py +24 -4
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/complete.py +2 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/COPYING +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyproject.toml +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/_settings.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/app.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/code_editors.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/languages/markdown.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/languages/python.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/languages/text.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/editor_panel.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/jupyter_console.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/settings_panel.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/sigmund.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/workspace_explorer.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/auto_indent.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/auto_pair.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/check.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/comment.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/execute.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/file_link.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/line_number.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/python_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/search_replace.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/shortcuts.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/smart_backspace_delete.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/symbols.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/theme.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/zoom.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/python_utils.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/signal_router.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/syntax_highlighters/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/syntax_highlighters/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/syntax_highlighters/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/syntax_highlighters/languages/python.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/syntax_highlighters/syntax_highlighter.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/themes.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/utils.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/watchdog.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/calltip_widget.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/completion_popup.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/dock.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/quick_open_dialog.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/quick_open_file_dialog.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/quick_symbol_dialog.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/search_replace_frame.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/tab_splitter.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/tabbed_editor.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/languages/python.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/manager.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/process.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/__init__.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/codestral.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/jedi.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/ruff.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/sigmund.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/symbol.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/settings.py +0 -0
- {pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/readme.md +0 -0
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/find_in_files.py
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import multiprocessing
|
|
3
3
|
from qtpy.QtWidgets import QDockWidget, QWidget, QVBoxLayout, QHBoxLayout, \
|
|
4
|
-
|
|
5
|
-
QAbstractItemView
|
|
4
|
+
QLineEdit, QCheckBox, QPushButton, QTreeWidget, QTreeWidgetItem, \
|
|
5
|
+
QAbstractItemView
|
|
6
6
|
from qtpy.QtCore import Qt, QTimer, Signal
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
|
|
9
9
|
def search_in_files_worker(files, search_text, case_sensitive, whole_word, regex, output_queue):
|
|
10
10
|
"""
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/project_explorer.py
RENAMED
|
@@ -118,6 +118,11 @@ class GitignoreFilterProxyModel(QSortFilterProxyModel):
|
|
|
118
118
|
return True
|
|
119
119
|
if not self.root_folder:
|
|
120
120
|
return True
|
|
121
|
+
# Always keep directories. We need to be able to look inside them
|
|
122
|
+
# because their children might be re-included by negated patterns in
|
|
123
|
+
# .gitignore.
|
|
124
|
+
if source_model.isDir(index):
|
|
125
|
+
return True
|
|
121
126
|
# Ignore explicitly ignored folders
|
|
122
127
|
path_parts = Path(abs_path).parts
|
|
123
128
|
if any(ignored in path_parts for ignored in settings.ignored_folders):
|
|
@@ -128,12 +128,32 @@ class Base:
|
|
|
128
128
|
self.modified = modified
|
|
129
129
|
self.modification_changed.emit(self, modified)
|
|
130
130
|
|
|
131
|
-
def jump_to_line(self, line_number=0):
|
|
132
|
-
|
|
131
|
+
def jump_to_line(self, line_number: int = 0):
|
|
132
|
+
"""
|
|
133
|
+
Jump to a specific line (0-based) in the QPlainTextEdit,
|
|
134
|
+
centre it in the viewport and select the whole line.
|
|
135
|
+
"""
|
|
136
|
+
# Sanity-check the requested line number
|
|
137
|
+
if line_number < 0:
|
|
138
|
+
line_number = 0
|
|
139
|
+
max_line = self.document().blockCount() - 1
|
|
140
|
+
line_number = min(line_number, max_line)
|
|
141
|
+
|
|
142
|
+
cursor = QTextCursor(self.document())
|
|
143
|
+
|
|
144
|
+
# Move to the requested line
|
|
133
145
|
cursor.movePosition(QTextCursor.Start)
|
|
134
|
-
cursor.movePosition(QTextCursor.
|
|
146
|
+
cursor.movePosition(QTextCursor.NextBlock, QTextCursor.MoveAnchor,
|
|
147
|
+
line_number - 1)
|
|
148
|
+
|
|
149
|
+
# Select the whole line for visibility
|
|
150
|
+
cursor.select(QTextCursor.LineUnderCursor)
|
|
151
|
+
|
|
152
|
+
# Apply the cursor to the editor
|
|
135
153
|
self.setTextCursor(cursor)
|
|
136
|
-
|
|
154
|
+
|
|
155
|
+
# Scroll so the line sits roughly in the middle of the viewport
|
|
156
|
+
self.centerCursor()
|
|
137
157
|
|
|
138
158
|
def update_theme(self):
|
|
139
159
|
"""Mixins can implement this to update the theme in response to font changes
|
|
@@ -70,6 +70,8 @@ class Complete:
|
|
|
70
70
|
pos = self.textCursor().position()
|
|
71
71
|
if self._cm_paren_prefix is None or pos >= len(self._cm_paren_prefix):
|
|
72
72
|
self._update_paren_prefix_cache()
|
|
73
|
+
if pos >= len(self._cm_paren_prefix):
|
|
74
|
+
return False
|
|
73
75
|
return self._cm_paren_prefix[pos] > 0
|
|
74
76
|
|
|
75
77
|
def _is_navigation_key(self, event):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/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.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/code_editors/languages/text.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/editor_panel.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/components/jupyter_console.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/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
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/mixins/python_auto_indent.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/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.10 → pyqt_code_editor-0.0.12}/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.10 → pyqt_code_editor-0.0.12}/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.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/calltip_widget.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/completion_popup.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/quick_open_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/quick_symbol_dialog.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/search_replace_frame.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/tab_splitter.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/widgets/tabbed_editor.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/languages/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/languages/generic.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/languages/python.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/codestral.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/jedi.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/ruff.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/sigmund.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.10 → pyqt_code_editor-0.0.12}/pyqt_code_editor/worker/providers/symbol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|