pyqt-code-editor 0.0.24__tar.gz → 0.0.26__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.
Files changed (78) hide show
  1. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/PKG-INFO +3 -2
  2. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyproject.toml +5 -4
  3. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/__init__.py +1 -1
  4. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/environment_manager.py +14 -6
  5. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/watchdog.py +3 -12
  6. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/completion_popup.py +4 -0
  7. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/quick_open_dialog.py +4 -1
  8. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/COPYING +0 -0
  9. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/_settings.py +0 -0
  10. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/app.py +0 -0
  11. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/code_editors/__init__.py +0 -0
  12. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/code_editors/code_editors.py +0 -0
  13. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/code_editors/languages/__init__.py +0 -0
  14. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/code_editors/languages/generic.py +0 -0
  15. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/code_editors/languages/markdown.py +0 -0
  16. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/code_editors/languages/python.py +0 -0
  17. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/code_editors/languages/text.py +0 -0
  18. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/__init__.py +0 -0
  19. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/editor_panel.py +0 -0
  20. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/find_in_files.py +0 -0
  21. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/jupyter_console.py +0 -0
  22. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/project_explorer.py +0 -0
  23. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/settings_panel.py +0 -0
  24. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/sigmund.py +0 -0
  25. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/components/workspace_explorer.py +0 -0
  26. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/__init__.py +0 -0
  27. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/auto_indent.py +0 -0
  28. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/auto_pair.py +0 -0
  29. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/base.py +0 -0
  30. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/check.py +0 -0
  31. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/comment.py +0 -0
  32. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/complete.py +0 -0
  33. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/execute.py +0 -0
  34. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/file_link.py +0 -0
  35. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/line_number.py +0 -0
  36. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/python_auto_indent.py +0 -0
  37. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/search_replace.py +0 -0
  38. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/shortcuts.py +0 -0
  39. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/smart_backspace_delete.py +0 -0
  40. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/symbols.py +0 -0
  41. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/theme.py +0 -0
  42. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/widgets/__init__.py +0 -0
  43. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/mixins/zoom.py +0 -0
  44. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/signal_router.py +0 -0
  45. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/syntax_highlighters/__init__.py +0 -0
  46. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/syntax_highlighters/languages/__init__.py +0 -0
  47. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/syntax_highlighters/languages/generic.py +0 -0
  48. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/syntax_highlighters/languages/python.py +0 -0
  49. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/syntax_highlighters/syntax_highlighter.py +0 -0
  50. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/themes.py +0 -0
  51. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/utils/__init__.py +0 -0
  52. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/utils/languages/__init__.py +0 -0
  53. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/utils/languages/python/__init__.py +0 -0
  54. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/utils/languages/python/_auto_indent.py +0 -0
  55. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/utils/languages/python/_extract_cells.py +0 -0
  56. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/utils/languages/python/_mask_str_in_code.py +0 -0
  57. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/__init__.py +0 -0
  58. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/calltip_widget.py +0 -0
  59. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/dock.py +0 -0
  60. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/quick_open_file_dialog.py +0 -0
  61. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/quick_symbol_dialog.py +0 -0
  62. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/search_replace_frame.py +0 -0
  63. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/tab_splitter.py +0 -0
  64. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/widgets/tabbed_editor.py +0 -0
  65. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/__init__.py +0 -0
  66. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/languages/__init__.py +0 -0
  67. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/languages/generic.py +0 -0
  68. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/languages/python.py +0 -0
  69. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/manager.py +0 -0
  70. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/process.py +0 -0
  71. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/providers/__init__.py +0 -0
  72. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/providers/codestral.py +0 -0
  73. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/providers/jedi.py +0 -0
  74. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/providers/ruff.py +0 -0
  75. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/providers/sigmund.py +0 -0
  76. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/providers/symbol.py +0 -0
  77. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/pyqt_code_editor/worker/settings.py +0 -0
  78. {pyqt_code_editor-0.0.24 → pyqt_code_editor-0.0.26}/readme.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqt_code_editor
3
- Version: 0.0.24
3
+ Version: 0.0.26
4
4
  Summary: Fully featured code-editor widgets for PyQt
5
5
  Keywords: code editor,pyqt,ide
6
6
  Author-email: Sebastiaan Mathôt <s.mathot@cogsci.nl>
@@ -12,6 +12,7 @@ Requires-Dist: detect-indent
12
12
  Requires-Dist: jedi
13
13
  Requires-Dist: mistralai
14
14
  Requires-Dist: pathspec
15
+ Requires-Dist: psutil
15
16
  Requires-Dist: pygments
16
17
  Requires-Dist: qtawesome
17
18
  Requires-Dist: qtpy
@@ -19,7 +20,7 @@ Requires-Dist: ruff
19
20
  Requires-Dist: opensesame-extension-sigmund
20
21
  Requires-Dist: pyqt6
21
22
  Requires-Dist: qtconsole
22
- Project-URL: Source, https://github.com/open-cogsci/pyqt_code_editor
23
+ Project-URL: Source, https://github.com/open-cogsci/sigmund-analyst
23
24
 
24
25
  # PyQt Code Editor / Sigmund Analyst
25
26
 
@@ -17,13 +17,14 @@ dependencies = [
17
17
  "jedi",
18
18
  "mistralai",
19
19
  "pathspec",
20
+ "psutil",
20
21
  "pygments",
21
22
  "qtawesome",
22
23
  "qtpy",
23
24
  "ruff",
24
- "opensesame-extension-sigmund",
25
- "pyqt6",
26
- "qtconsole"
25
+ "opensesame-extension-sigmund",
26
+ "pyqt6",
27
+ "qtconsole"
27
28
  ]
28
29
  keywords = ["code editor", "pyqt", "ide"]
29
30
 
@@ -31,7 +32,7 @@ keywords = ["code editor", "pyqt", "ide"]
31
32
  exclude = ["doc-pelican", "testcases", ".github"]
32
33
 
33
34
  [project.urls]
34
- Source = "https://github.com/open-cogsci/pyqt_code_editor"
35
+ Source = "https://github.com/open-cogsci/sigmund-analyst"
35
36
 
36
37
  [project.scripts]
37
38
  sigmund-analyst = "pyqt_code_editor.app:launch_app"
@@ -2,4 +2,4 @@
2
2
 
3
3
  from ._settings import settings
4
4
 
5
- __version__ = '0.0.24'
5
+ __version__ = '0.0.26'
@@ -1,5 +1,7 @@
1
+ import os
1
2
  from qtpy.QtCore import Signal, QObject
2
-
3
+ import logging
4
+ logger = logging.getLogger(__name__)
3
5
 
4
6
  class EnvironmentManager(QObject):
5
7
  """Singleton class to share the current environment and language between all
@@ -18,11 +20,17 @@ class EnvironmentManager(QObject):
18
20
  return self.name, self.path, self.language
19
21
 
20
22
  def set_environment(self, name, path, language):
21
- if path != self.path:
22
- self.name = name
23
- self.path = path
24
- self.language = language
25
- self.environment_changed.emit(name, path, language)
23
+ path = os.path.abspath(path)
24
+ if path == self.path:
25
+ return
26
+ if not os.path.exists(path):
27
+ logger.warning(f'no such environment: {path}')
28
+ return
29
+ logger.info(f'environment changed: {path}')
30
+ self.name = name
31
+ self.path = path
32
+ self.language = language
33
+ self.environment_changed.emit(name, path, language)
26
34
 
27
35
 
28
36
  # Singleton instance
@@ -19,6 +19,7 @@ import signal
19
19
  import sys
20
20
  import time
21
21
  import logging
22
+ import psutil
22
23
  logging.basicConfig(level=logging.INFO, force=True)
23
24
  logger = logging.getLogger(__name__)
24
25
 
@@ -39,7 +40,7 @@ def _watchdog_main(main_pid, child_conn):
39
40
 
40
41
  while True:
41
42
  # Check if main process is still alive
42
- if not _is_process_alive(main_pid):
43
+ if not psutil.pid_exists(main_pid):
43
44
  logger.info("watchdog: Main process died, killing all subprocesses")
44
45
  _kill_all_processes(registered_pids)
45
46
  sys.exit(0)
@@ -60,16 +61,6 @@ def _watchdog_main(main_pid, child_conn):
60
61
  time.sleep(_CHECK_INTERVAL)
61
62
 
62
63
 
63
- def _is_process_alive(pid):
64
- """Check if a process with the given pid is alive."""
65
- try:
66
- # Sending signal 0 checks if process exists without affecting it
67
- os.kill(pid, 0)
68
- return True
69
- except OSError:
70
- return False
71
-
72
-
73
64
  def _kill_all_processes(pids):
74
65
  """Kill all processes with the given pids."""
75
66
  for pid in pids:
@@ -86,7 +77,7 @@ def _kill_all_processes(pids):
86
77
  # Force kill any remaining processes
87
78
  for pid in pids:
88
79
  try:
89
- if _is_process_alive(pid):
80
+ if psutil.pid_exists(pid):
90
81
  os.kill(pid, signal.SIGKILL)
91
82
  logger.info(f"watchdog: Sent SIGKILL to {pid}")
92
83
  except OSError:
@@ -21,6 +21,10 @@ class CompletionPopup(QListWidget):
21
21
  background-color: {editor.code_editor_colors['background']};
22
22
  font: {settings.font_size}pt '{settings.font_family}';
23
23
  border: 1px solid {editor.code_editor_colors['border']};
24
+ outline: none;
25
+ }}
26
+ QListWidget::item:selected {{
27
+ background-color: {editor.code_editor_colors['highlight']};
24
28
  }}''')
25
29
  # Use a frameless tool window so it can float above the editor
26
30
  # without stealing focus. Note we do NOT use Qt.Popup here.
@@ -58,9 +58,12 @@ QLineEdit, QListView {{
58
58
  border: none;
59
59
  font-family: {font_family};
60
60
  font-size: {font_size}px;
61
- background-color: {selection_background};
61
+ background-color: {background};
62
62
  padding: 4px;
63
63
  }}
64
+ QListView::item:selected {{
65
+ background-color: {selection_background};
66
+ }}
64
67
  '''
65
68
 
66
69
  class QuickOpenDialog(QDialog):