pyqt-code-editor 0.0.16__tar.gz → 0.0.18__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.16 → pyqt_code_editor-0.0.18}/PKG-INFO +1 -1
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/__init__.py +1 -1
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/sigmund.py +1 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/utils/languages/python/_mask_str_in_code.py +11 -5
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/COPYING +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyproject.toml +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/_settings.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/app.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/code_editors.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/languages/markdown.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/languages/python.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/languages/text.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/editor_panel.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/find_in_files.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/jupyter_console.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/project_explorer.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/settings_panel.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/workspace_explorer.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/auto_indent.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/auto_pair.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/base.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/check.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/comment.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/complete.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/execute.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/file_link.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/line_number.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/python_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/search_replace.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/shortcuts.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/smart_backspace_delete.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/symbols.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/theme.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/zoom.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/signal_router.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/syntax_highlighters/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/syntax_highlighters/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/syntax_highlighters/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/syntax_highlighters/languages/python.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/syntax_highlighters/syntax_highlighter.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/themes.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/utils/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/utils/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/utils/languages/python/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/utils/languages/python/_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/utils/languages/python/_extract_cells.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/watchdog.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/calltip_widget.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/completion_popup.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/dock.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/quick_open_dialog.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/quick_open_file_dialog.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/quick_symbol_dialog.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/search_replace_frame.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/tab_splitter.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/tabbed_editor.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/languages/python.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/manager.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/process.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/__init__.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/codestral.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/jedi.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/ruff.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/sigmund.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/symbol.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/settings.py +0 -0
- {pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/readme.md +0 -0
|
@@ -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.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/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.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/code_editors/languages/text.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/editor_panel.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/find_in_files.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/jupyter_console.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/components/project_explorer.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/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.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/python_auto_indent.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/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.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/mixins/widgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/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.16 → pyqt_code_editor-0.0.18}/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.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/calltip_widget.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/completion_popup.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/quick_open_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/quick_symbol_dialog.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/search_replace_frame.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/tab_splitter.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/widgets/tabbed_editor.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/languages/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/languages/generic.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/languages/python.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/codestral.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/jedi.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/ruff.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/sigmund.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.16 → pyqt_code_editor-0.0.18}/pyqt_code_editor/worker/providers/symbol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|