pyqt-code-editor 0.0.17__tar.gz → 0.0.19__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.17 → pyqt_code_editor-0.0.19}/PKG-INFO +1 -1
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/__init__.py +1 -1
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/settings_panel.py +13 -11
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/themes.py +1 -1
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/utils/languages/python/_mask_str_in_code.py +11 -5
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/COPYING +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyproject.toml +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/_settings.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/app.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/code_editors.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/languages/markdown.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/languages/python.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/languages/text.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/editor_panel.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/find_in_files.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/jupyter_console.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/project_explorer.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/sigmund.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/workspace_explorer.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/auto_indent.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/auto_pair.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/base.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/check.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/comment.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/complete.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/execute.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/file_link.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/line_number.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/python_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/search_replace.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/shortcuts.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/smart_backspace_delete.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/symbols.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/theme.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/zoom.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/signal_router.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/syntax_highlighters/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/syntax_highlighters/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/syntax_highlighters/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/syntax_highlighters/languages/python.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/syntax_highlighters/syntax_highlighter.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/utils/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/utils/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/utils/languages/python/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/utils/languages/python/_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/utils/languages/python/_extract_cells.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/watchdog.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/calltip_widget.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/completion_popup.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/dock.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/quick_open_dialog.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/quick_open_file_dialog.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/quick_symbol_dialog.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/search_replace_frame.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/tab_splitter.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/tabbed_editor.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/languages/python.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/manager.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/process.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/__init__.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/codestral.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/jedi.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/ruff.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/sigmund.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/symbol.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/settings.py +0 -0
- {pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/readme.md +0 -0
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/settings_panel.py
RENAMED
|
@@ -25,8 +25,9 @@ class SettingsWidget(QWidget):
|
|
|
25
25
|
types are int, bool and str.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
def __init__(self, parent=None):
|
|
28
|
+
def __init__(self, parent=None, visible_categories=None):
|
|
29
29
|
super().__init__(parent)
|
|
30
|
+
self._visible_categories = visible_categories
|
|
30
31
|
self.setup_ui()
|
|
31
32
|
self.load_settings()
|
|
32
33
|
|
|
@@ -45,7 +46,9 @@ class SettingsWidget(QWidget):
|
|
|
45
46
|
self.scroll_area = QScrollArea()
|
|
46
47
|
self.scroll_area.setWidgetResizable(True)
|
|
47
48
|
self.scroll_widget = QWidget()
|
|
48
|
-
self.scroll_layout =
|
|
49
|
+
self.scroll_layout = QFormLayout(self.scroll_widget)
|
|
50
|
+
self.scroll_layout.setContentsMargins(0, 0, 0, 0)
|
|
51
|
+
self.scroll_area.setFrameStyle(QScrollArea.NoFrame)
|
|
49
52
|
self.scroll_area.setWidget(self.scroll_widget)
|
|
50
53
|
|
|
51
54
|
# Add scroll area to main layout
|
|
@@ -72,25 +75,24 @@ class SettingsWidget(QWidget):
|
|
|
72
75
|
|
|
73
76
|
# Create a form for each category
|
|
74
77
|
for category, setting_names in categories.items():
|
|
75
|
-
if not
|
|
78
|
+
if self._visible_categories is not None and \
|
|
79
|
+
category not in self._visible_categories:
|
|
76
80
|
continue
|
|
77
|
-
|
|
81
|
+
if not setting_names:
|
|
82
|
+
continue
|
|
78
83
|
group_box = QGroupBox(category)
|
|
79
|
-
form_layout = QFormLayout(group_box)
|
|
80
|
-
form_layout.setContentsMargins(*themes.OUTER_CONTENT_MARGINS)
|
|
81
|
-
|
|
84
|
+
form_layout = QFormLayout(group_box)
|
|
82
85
|
for setting_name in setting_names:
|
|
83
86
|
value = getattr(settings, setting_name)
|
|
84
87
|
widget = self.create_widget_for_setting(setting_name, value)
|
|
85
88
|
|
|
86
89
|
if widget:
|
|
87
|
-
form_layout.addRow(
|
|
90
|
+
form_layout.addRow(
|
|
91
|
+
setting_name.replace('_', ' ').title() + ":", widget)
|
|
88
92
|
self.setting_widgets[setting_name] = widget
|
|
89
93
|
|
|
90
|
-
self.scroll_layout.
|
|
94
|
+
self.scroll_layout.addRow(group_box, None)
|
|
91
95
|
|
|
92
|
-
self.scroll_layout.addStretch()
|
|
93
|
-
|
|
94
96
|
def create_widget_for_setting(self, setting_name, value):
|
|
95
97
|
"""Create appropriate widget based on setting type"""
|
|
96
98
|
logger.debug(f"Creating widget for setting {setting_name} with value {value}")
|
|
@@ -40,10 +40,17 @@ def mask_str_in_code(code: str, mask_char: str = 'X') -> str:
|
|
|
40
40
|
"""
|
|
41
41
|
# First handle f-strings separately using regex
|
|
42
42
|
# This regex matches f-strings with their content
|
|
43
|
-
|
|
43
|
+
# Make sure 'f' is preceded by something that indicates start of a new token
|
|
44
|
+
fstring_pattern = r'(?:^|[^a-zA-Z0-9_"\'])(f)(""".*?"""|\'\'\'.*?\'\'\'|".*?"|\'.*?\')'
|
|
44
45
|
|
|
45
46
|
def mask_fstring(match):
|
|
46
|
-
|
|
47
|
+
# Get the character before 'f' (if any)
|
|
48
|
+
full_match = match.group(0)
|
|
49
|
+
prefix_char = ''
|
|
50
|
+
if not full_match.startswith('f'):
|
|
51
|
+
prefix_char = full_match[0]
|
|
52
|
+
|
|
53
|
+
prefix = match.group(1) # 'f'
|
|
47
54
|
full_string = match.group(2)
|
|
48
55
|
quote = ''
|
|
49
56
|
content = ''
|
|
@@ -57,7 +64,7 @@ def mask_str_in_code(code: str, mask_char: str = 'X') -> str:
|
|
|
57
64
|
|
|
58
65
|
# Mask everything in f-string content
|
|
59
66
|
masked_content = mask_char * len(content)
|
|
60
|
-
return prefix + quote + masked_content + quote
|
|
67
|
+
return prefix_char + prefix + quote + masked_content + quote
|
|
61
68
|
|
|
62
69
|
# Apply f-string masking
|
|
63
70
|
code = re.sub(fstring_pattern, mask_fstring, code, flags=re.DOTALL)
|
|
@@ -76,7 +83,6 @@ def mask_str_in_code(code: str, mask_char: str = 'X') -> str:
|
|
|
76
83
|
if token.type == tokenize.STRING:
|
|
77
84
|
# Get the string content including quotes
|
|
78
85
|
string_value = token.string
|
|
79
|
-
|
|
80
86
|
# Skip if it looks like an f-string (already handled)
|
|
81
87
|
if string_value.startswith(('f"', "f'", 'f"""', "f'''")):
|
|
82
88
|
# Add any code between last token and this one
|
|
@@ -182,4 +188,4 @@ def mask_str_in_code(code: str, mask_char: str = 'X') -> str:
|
|
|
182
188
|
masked_parts.append('\n')
|
|
183
189
|
masked_parts.extend('\n'.join(lines[end_line:]))
|
|
184
190
|
|
|
185
|
-
return ''.join(masked_parts)
|
|
191
|
+
return ''.join(masked_parts)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/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.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/code_editors/languages/text.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/editor_panel.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/find_in_files.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/jupyter_console.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/components/project_explorer.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.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/python_auto_indent.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/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.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/mixins/widgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/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
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/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
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/calltip_widget.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/completion_popup.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/quick_open_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/quick_symbol_dialog.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/search_replace_frame.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/tab_splitter.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/widgets/tabbed_editor.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/languages/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/languages/generic.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/languages/python.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/codestral.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/jedi.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/ruff.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/sigmund.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.17 → pyqt_code_editor-0.0.19}/pyqt_code_editor/worker/providers/symbol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|