MoleditPy-linux 2.6.2__tar.gz → 2.6.3__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 (66) hide show
  1. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/PKG-INFO +1 -1
  2. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/pyproject.toml +1 -1
  3. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/MoleditPy_linux.egg-info/PKG-INFO +1 -1
  4. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/analysis_window.py +1 -0
  5. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/calculation_worker.py +1 -1
  6. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/constants.py +1 -1
  7. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/custom_interactor_style.py +2 -5
  8. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window.py +0 -7
  9. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_app_state.py +1 -6
  10. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_compute.py +5 -6
  11. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_dialog_manager.py +0 -9
  12. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_edit_3d.py +0 -1
  13. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_edit_actions.py +14 -24
  14. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_export.py +0 -9
  15. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_main_init.py +0 -8
  16. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_molecular_parsers.py +2 -13
  17. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_project_io.py +0 -22
  18. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_string_importers.py +0 -17
  19. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_ui_manager.py +0 -9
  20. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_view_3d.py +0 -8
  21. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/main_window_view_loaders.py +0 -10
  22. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/molecule_scene.py +0 -1
  23. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/LICENSE +0 -0
  24. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/README.md +0 -0
  25. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/setup.cfg +0 -0
  26. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/MoleditPy_linux.egg-info/SOURCES.txt +0 -0
  27. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/MoleditPy_linux.egg-info/dependency_links.txt +0 -0
  28. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/MoleditPy_linux.egg-info/entry_points.txt +0 -0
  29. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/MoleditPy_linux.egg-info/requires.txt +0 -0
  30. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/MoleditPy_linux.egg-info/top_level.txt +0 -0
  31. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/__init__.py +0 -0
  32. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/__main__.py +0 -0
  33. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/assets/file_icon.ico +0 -0
  34. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/assets/icon.icns +0 -0
  35. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/assets/icon.ico +0 -0
  36. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/assets/icon.png +0 -0
  37. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/main.py +0 -0
  38. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/__init__.py +0 -0
  39. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/about_dialog.py +0 -0
  40. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/align_plane_dialog.py +0 -0
  41. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/alignment_dialog.py +0 -0
  42. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/angle_dialog.py +0 -0
  43. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/atom_item.py +0 -0
  44. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/bond_item.py +0 -0
  45. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/bond_length_dialog.py +0 -0
  46. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/color_settings_dialog.py +0 -0
  47. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/constrained_optimization_dialog.py +0 -0
  48. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/custom_qt_interactor.py +0 -0
  49. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/dialog3_d_picking_mixin.py +0 -0
  50. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/dihedral_dialog.py +0 -0
  51. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/mirror_dialog.py +0 -0
  52. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/mol_geometry.py +0 -0
  53. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/molecular_data.py +0 -0
  54. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/move_group_dialog.py +0 -0
  55. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/periodic_table_dialog.py +0 -0
  56. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/planarize_dialog.py +0 -0
  57. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/plugin_interface.py +0 -0
  58. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/plugin_manager.py +0 -0
  59. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/plugin_manager_window.py +0 -0
  60. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/settings_dialog.py +0 -0
  61. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/sip_isdeleted_safe.py +0 -0
  62. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/template_preview_item.py +0 -0
  63. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/template_preview_view.py +0 -0
  64. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/translation_dialog.py +0 -0
  65. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/user_template_dialog.py +0 -0
  66. {moleditpy_linux-2.6.2 → moleditpy_linux-2.6.3}/src/moleditpy_linux/modules/zoomable_view.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy-linux
3
- Version: 2.6.2
3
+ Version: 2.6.3
4
4
  Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
5
5
  Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "MoleditPy-linux"
7
7
 
8
- version = "2.6.2"
8
+ version = "2.6.3"
9
9
 
10
10
  license = {file = "LICENSE"}
11
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy-linux
3
- Version: 2.6.2
3
+ Version: 2.6.3
4
4
  Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
5
5
  Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -20,6 +20,7 @@ from PyQt6.QtWidgets import (
20
20
  QPushButton,
21
21
  QVBoxLayout,
22
22
  )
23
+
23
24
  from rdkit import Chem
24
25
  from rdkit.Chem import Descriptors, rdMolDescriptors
25
26
  from rdkit.Chem import inchi as rd_inchi
@@ -82,7 +82,7 @@ class CalculationWorker(QObject):
82
82
  if _check_halted():
83
83
  return
84
84
  self.status_update.emit(msg)
85
- except Exception: # pragma: no cover
85
+ except Exception:
86
86
  # Swallow any signal-emission errors to avoid crashing the worker
87
87
  pass
88
88
 
@@ -16,7 +16,7 @@ from PyQt6.QtGui import QColor, QFont
16
16
  from rdkit import Chem
17
17
 
18
18
  # Version
19
- VERSION = "2.6.2"
19
+ VERSION = "2.6.3"
20
20
 
21
21
  ATOM_RADIUS = 18
22
22
  BOND_OFFSET = 3.5
@@ -599,11 +599,11 @@ class CustomInteractorStyle(vtkInteractorStyleTrackballCamera):
599
599
  try:
600
600
  pos = mw.atom_positions_3d[i]
601
601
  conf.SetAtomPosition(i, pos.tolist())
602
- except Exception: # pragma: no cover
602
+ except Exception:
603
603
  # Skip individual failures but continue applying
604
604
  # other atom positions.
605
605
  pass
606
- except Exception: # pragma: no cover
606
+ except Exception:
607
607
  # If applying positions fails, continue to redraw from
608
608
  # whatever authoritative state is available.
609
609
  pass
@@ -640,9 +640,6 @@ class CustomInteractorStyle(vtkInteractorStyleTrackballCamera):
640
640
  except Exception: # pragma: no cover
641
641
  import traceback
642
642
  traceback.print_exc()
643
- except Exception: # pragma: no cover
644
- # Do not allow a failure here to interrupt release flow
645
- pass
646
643
  else:
647
644
  # カメラ回転の後始末を親クラスに任せます
648
645
  super().OnLeftButtonUp()
@@ -12,19 +12,12 @@ DOI: 10.5281/zenodo.17268532
12
12
 
13
13
  import traceback
14
14
 
15
- # RDKit imports (explicit to satisfy flake8 and used features)
16
- try:
17
- pass
18
- except Exception: # pragma: no cover
19
- traceback.print_exc()
20
-
21
15
  # PyQt6 Modules
22
16
  from PyQt6.QtCore import pyqtSignal, pyqtSlot
23
17
  from PyQt6.QtWidgets import QMainWindow
24
18
 
25
19
  try:
26
20
  from PyQt6 import sip as _sip # type: ignore
27
-
28
21
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
29
22
  except Exception:
30
23
  _sip = None
@@ -16,27 +16,22 @@ MainWindow (main_window.py) から分離されたモジュール
16
16
  機能クラス: MainWindowAppState
17
17
  """
18
18
 
19
-
20
19
  import base64
21
20
  import copy
22
21
  import os
23
22
  import traceback
24
-
25
23
  import numpy as np
26
24
 
27
25
  # RDKit imports (explicit to satisfy flake8 and used features)
28
26
  from rdkit import Chem
29
27
  from rdkit.Chem import Descriptors, rdMolDescriptors
30
28
 
31
-
32
-
33
29
  # PyQt6 Modules
34
30
  from PyQt6.QtCore import QDateTime, QPointF, Qt
35
31
  from PyQt6.QtWidgets import QMessageBox
36
32
 
37
33
  try:
38
34
  from PyQt6 import sip as _sip # type: ignore
39
-
40
35
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
41
36
  except Exception:
42
37
  _sip = None
@@ -860,7 +855,7 @@ class MainWindowAppState(object):
860
855
  except Exception: # pragma: no cover
861
856
  import traceback
862
857
  traceback.print_exc()
863
- except Exception: # pragma: no cover
858
+ except Exception:
864
859
  # non-fatal if mapping creation fails
865
860
  pass
866
861
 
@@ -33,7 +33,6 @@ except Exception:
33
33
 
34
34
  try:
35
35
  from PyQt6 import sip as _sip # type: ignore
36
-
37
36
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
38
37
  except Exception:
39
38
  _sip = None
@@ -397,7 +396,7 @@ class MainWindowCompute(object):
397
396
  # Keep a reference so we can reliably remove the text actor later
398
397
  try:
399
398
  self._calculating_text_actor = text_actor
400
- except Exception: # pragma: no cover
399
+ except Exception:
401
400
  # Best-effort: if storing fails, ignore — cleanup will still attempt renderer removal
402
401
  pass
403
402
  text_actor.GetTextProperty().SetOpacity(1) # pragma: no cover
@@ -1005,7 +1004,7 @@ class MainWindowCompute(object):
1005
1004
  try:
1006
1005
  if mol.HasProp("_pme_optimization_method"):
1007
1006
  opt_method = mol.GetProp("_pme_optimization_method")
1008
- except Exception: # pragma: no cover
1007
+ except Exception:
1009
1008
  # not all Mol objects support HasProp/GetProp safely
1010
1009
  pass
1011
1010
  except Exception: # pragma: no cover
@@ -1025,7 +1024,7 @@ class MainWindowCompute(object):
1025
1024
  else:
1026
1025
  # store raw value otherwise
1027
1026
  self.last_successful_optimization_method = opt_method
1028
- except Exception: # pragma: no cover
1027
+ except Exception:
1029
1028
  # non-fatal
1030
1029
  pass
1031
1030
 
@@ -1054,8 +1053,8 @@ class MainWindowCompute(object):
1054
1053
 
1055
1054
  self.update_chiral_labels()
1056
1055
  except Exception: # pragma: no cover
1057
- # 念のためエラーを握り潰して UI を壊さない
1058
- pass
1056
+ import traceback
1057
+ traceback.print_exc()
1059
1058
 
1060
1059
  self.draw_molecule_3d(mol)
1061
1060
 
@@ -19,21 +19,12 @@ MainWindow (main_window.py) から分離されたモジュール
19
19
  import json
20
20
  import os
21
21
 
22
- # RDKit imports (explicit to satisfy flake8 and used features)
23
- try:
24
- pass
25
- except Exception: # pragma: no cover
26
- import traceback
27
-
28
- pass
29
-
30
22
  # PyQt6 Modules
31
23
  from PyQt6.QtCore import QDateTime
32
24
  from PyQt6.QtWidgets import QInputDialog, QMessageBox
33
25
 
34
26
  try:
35
27
  from PyQt6 import sip as _sip # type: ignore
36
-
37
28
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
38
29
  except Exception:
39
30
  _sip = None
@@ -38,7 +38,6 @@ from PyQt6.QtWidgets import QGraphicsTextItem
38
38
 
39
39
  try:
40
40
  from PyQt6 import sip as _sip # type: ignore
41
-
42
41
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
43
42
  except Exception:
44
43
  _sip = None
@@ -194,8 +194,6 @@ class MainWindowEditActions(object):
194
194
 
195
195
  except Exception as e:
196
196
  print(f"Error during copy operation: {e}")
197
-
198
- pass
199
197
  self.statusBar().showMessage(f"Error during copy operation: {e}")
200
198
 
201
199
  def cut_selection(self):
@@ -214,8 +212,6 @@ class MainWindowEditActions(object):
214
212
 
215
213
  except Exception as e:
216
214
  print(f"Error during cut operation: {e}")
217
-
218
- pass
219
215
  self.statusBar().showMessage(f"Error during cut operation: {e}")
220
216
 
221
217
  def paste_from_clipboard(self):
@@ -270,8 +266,6 @@ class MainWindowEditActions(object):
270
266
 
271
267
  except Exception as e:
272
268
  print(f"Error during paste operation: {e}")
273
-
274
- pass
275
269
  self.statusBar().showMessage(f"Error during paste operation: {e}")
276
270
  self.statusBar().showMessage(f"Pasted {len(new_atoms)} atoms.", 2000)
277
271
  self.activate_select_mode()
@@ -384,8 +378,8 @@ class MainWindowEditActions(object):
384
378
  try:
385
379
  self.push_undo_state()
386
380
  except Exception: # pragma: no cover
387
- # Do not allow undo stack problems to crash the app
388
- pass
381
+ import traceback
382
+ traceback.print_exc()
389
383
  self.statusBar().showMessage(
390
384
  f"Removed {removed_count} hydrogen atoms.", 2000
391
385
  )
@@ -404,7 +398,6 @@ class MainWindowEditActions(object):
404
398
  except Exception as e:
405
399
  # Capture and log unexpected errors but don't let them crash the UI
406
400
  print(f"Error during hydrogen removal: {e}")
407
- pass
408
401
  try:
409
402
  self.statusBar().showMessage(f"Error removing hydrogen atoms: {e}")
410
403
  except Exception: # pragma: no cover
@@ -608,7 +601,6 @@ class MainWindowEditActions(object):
608
601
 
609
602
  except Exception as e:
610
603
  print(f"Error during hydrogen addition: {e}")
611
- pass
612
604
  self.statusBar().showMessage(f"Error adding hydrogen atoms: {e}")
613
605
 
614
606
  def update_edit_menu_actions(self):
@@ -697,7 +689,6 @@ class MainWindowEditActions(object):
697
689
 
698
690
  except Exception as e:
699
691
  print(f"Error rotating molecule: {e}")
700
- pass
701
692
  self.statusBar().showMessage(f"Error rotating: {e}")
702
693
 
703
694
  def select_all(self):
@@ -911,8 +902,8 @@ class MainWindowEditActions(object):
911
902
  if is_deleted_func and is_deleted_func(item):
912
903
  continue
913
904
  except Exception: # pragma: no cover
914
- # If sip check itself fails, continue with other lightweight guards
915
- pass
905
+ import traceback
906
+ traceback.print_exc()
916
907
 
917
908
  # If the item is no longer in a scene, skip updating it to avoid
918
909
  # touching partially-deleted objects during scene teardown.
@@ -950,9 +941,8 @@ class MainWindowEditActions(object):
950
941
  try:
951
942
  item.implicit_h_count = new_count
952
943
  except Exception: # pragma: no cover
953
- # If setting the count fails, continue but still
954
- # attempt to set the problem flag below.
955
- pass
944
+ import traceback
945
+ traceback.print_exc()
956
946
 
957
947
  # Apply problem flag (visual red-outline)
958
948
  try:
@@ -984,8 +974,8 @@ class MainWindowEditActions(object):
984
974
  try:
985
975
  it.update()
986
976
  except Exception: # pragma: no cover
987
- # ignore update errors for robustness
988
- pass
977
+ import traceback
978
+ traceback.print_exc()
989
979
  except Exception:
990
980
  # Ignore any unexpected errors when touching the item
991
981
  continue
@@ -1001,8 +991,8 @@ class MainWindowEditActions(object):
1001
991
  import traceback
1002
992
  traceback.print_exc()
1003
993
  except Exception: # pragma: no cover
1004
- # Make sure update failures never crash the application
1005
- pass
994
+ import traceback
995
+ traceback.print_exc()
1006
996
 
1007
997
  def clean_up_2d_structure(self):
1008
998
  self.statusBar().showMessage("Optimizing 2D structure...")
@@ -1084,8 +1074,8 @@ class MainWindowEditActions(object):
1084
1074
  if sip_isdeleted_safe(item):
1085
1075
  continue
1086
1076
  except Exception: # pragma: no cover
1087
- # If the sip check fails, continue with other lightweight guards
1088
- pass
1077
+ import traceback
1078
+ traceback.print_exc()
1089
1079
  try:
1090
1080
  sc = None
1091
1081
  try:
@@ -1557,8 +1547,8 @@ class MainWindowEditActions(object):
1557
1547
  import traceback
1558
1548
  traceback.print_exc()
1559
1549
  except Exception: # pragma: no cover
1560
- # best-effort only
1561
- pass
1550
+ import traceback
1551
+ traceback.print_exc()
1562
1552
 
1563
1553
  # Reset UI flags
1564
1554
  try:
@@ -21,14 +21,6 @@ import os
21
21
 
22
22
  import numpy as np
23
23
 
24
- # RDKit imports (explicit to satisfy flake8 and used features)
25
- try:
26
- pass
27
- except Exception: # pragma: no cover
28
- import traceback
29
-
30
- pass
31
-
32
24
  # PyQt6 Modules
33
25
  import pyvista as pv
34
26
  from PyQt6.QtCore import QRectF, QSize, Qt
@@ -38,7 +30,6 @@ from PyQt6.QtWidgets import QApplication, QFileDialog, QMessageBox
38
30
 
39
31
  try:
40
32
  from PyQt6 import sip as _sip # type: ignore
41
-
42
33
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
43
34
  except Exception:
44
35
  _sip = None
@@ -26,13 +26,6 @@ import sys
26
26
  # RDKit imports (explicit to satisfy flake8 and used features)
27
27
  from rdkit import Chem
28
28
 
29
- try:
30
- pass
31
- except Exception: # pragma: no cover
32
- import traceback
33
-
34
- pass
35
-
36
29
  # PyQt6 Modules
37
30
  from PyQt6.QtCore import QLineF, QPointF, QRectF, Qt, QTimer, QUrl
38
31
  from PyQt6.QtGui import (
@@ -453,7 +446,6 @@ class MainWindowMainInit(object):
453
446
  except Exception: # pragma: no cover
454
447
  import traceback
455
448
  traceback.print_exc()
456
- pass
457
449
 
458
450
  right_buttons_layout.addWidget(self.optimize_3d_button)
459
451
 
@@ -25,13 +25,6 @@ import traceback
25
25
  from rdkit import Chem
26
26
  from rdkit.Chem import AllChem, Descriptors, rdGeometry, rdMolTransforms
27
27
 
28
- try:
29
- pass
30
- except Exception: # pragma: no cover
31
- import traceback
32
-
33
- pass
34
-
35
28
  # PyQt6 Modules
36
29
  from PyQt6.QtCore import QPointF, QTimer
37
30
  from PyQt6.QtWidgets import (
@@ -48,7 +41,6 @@ from PyQt6.QtWidgets import (
48
41
 
49
42
  try:
50
43
  from PyQt6 import sip as _sip # type: ignore
51
-
52
44
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
53
45
  except Exception:
54
46
  _sip = None
@@ -194,7 +186,6 @@ class MainWindowMolecularParsers(object):
194
186
  self.statusBar().showMessage(f"Invalid MOL file format: {e}")
195
187
  except Exception as e:
196
188
  self.statusBar().showMessage(f"Error loading file: {e}")
197
- pass
198
189
 
199
190
  def load_xyz_file(self, file_path):
200
191
  """XYZファイルを読み込んでRDKitのMolオブジェクトを作成する"""
@@ -971,7 +962,7 @@ class MainWindowMolecularParsers(object):
971
962
  try:
972
963
  mol.AddBond(i, j, Chem.BondType.SINGLE)
973
964
  bonds_added.append((i, j, distance))
974
- except Exception: # pragma: no cover
965
+ except Exception:
975
966
  # 既に結合が存在する場合はスキップ
976
967
  pass
977
968
 
@@ -983,7 +974,7 @@ class MainWindowMolecularParsers(object):
983
974
  def save_as_mol(self):
984
975
  try:
985
976
  mol_block = self.data.to_mol_block()
986
- if not mol_block: # pragma: no cover
977
+ if not mol_block:
987
978
  self.statusBar().showMessage("Error: No 2D data to save.")
988
979
  return
989
980
 
@@ -1037,8 +1028,6 @@ class MainWindowMolecularParsers(object):
1037
1028
  except Exception as e:
1038
1029
  self.statusBar().showMessage(f"Error saving file: {e}")
1039
1030
 
1040
- pass
1041
-
1042
1031
  def save_as_xyz(self):
1043
1032
  if not self.current_mol: # pragma: no cover
1044
1033
  self.statusBar().showMessage("Error: Please generate a 3D structure first.")
@@ -22,33 +22,17 @@ import os
22
22
  import pickle
23
23
  import traceback
24
24
 
25
- # RDKit imports (explicit to satisfy flake8 and used features)
26
- try:
27
- pass
28
- except Exception: # pragma: no cover
29
- import traceback
30
-
31
- pass
32
-
33
25
  # PyQt6 Modules
34
26
  from PyQt6.QtCore import QTimer
35
27
  from PyQt6.QtWidgets import QFileDialog, QMessageBox
36
28
 
37
29
  try:
38
30
  from PyQt6 import sip as _sip # type: ignore
39
-
40
31
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
41
32
  except Exception:
42
33
  _sip = None
43
34
  _sip_isdeleted = None
44
35
 
45
- try:
46
- # package relative imports (preferred when running as `python -m moleditpy`)
47
- pass
48
- except Exception: # pragma: no cover
49
- # Fallback to absolute imports for script-style execution
50
- pass
51
-
52
36
 
53
37
  # --- クラス定義 ---
54
38
  class MainWindowProjectIo(object):
@@ -93,7 +77,6 @@ class MainWindowProjectIo(object):
93
77
  self.statusBar().showMessage(f"Data serialization error: {e}")
94
78
  except Exception as e:
95
79
  self.statusBar().showMessage(f"Error saving project file: {e}")
96
- pass
97
80
  else:
98
81
  # MOL/SDF/XYZなどは上書き保存せず、必ず「名前を付けて保存」にする
99
82
  self.save_project_as()
@@ -158,7 +141,6 @@ class MainWindowProjectIo(object):
158
141
  self.statusBar().showMessage(f"Data serialization error: {e}")
159
142
  except Exception as e:
160
143
  self.statusBar().showMessage(f"Error saving project file: {e}")
161
- pass
162
144
 
163
145
  def save_raw_data(self):
164
146
  if not self.data.atoms and not self.current_mol:
@@ -218,7 +200,6 @@ class MainWindowProjectIo(object):
218
200
  self.statusBar().showMessage(f"Data serialization error: {e}")
219
201
  except Exception as e:
220
202
  self.statusBar().showMessage(f"Error saving project file: {e}")
221
- pass
222
203
 
223
204
  def load_raw_data(self, file_path=None):
224
205
  if not file_path: # pragma: no cover
@@ -255,7 +236,6 @@ class MainWindowProjectIo(object):
255
236
  self.statusBar().showMessage(f"Invalid project file format: {e}")
256
237
  except Exception as e:
257
238
  self.statusBar().showMessage(f"Error loading project file: {e}")
258
- pass
259
239
 
260
240
  def save_as_json(self):
261
241
  """PMEJSONファイル形式で保存 (3D MOL情報含む)"""
@@ -314,7 +294,6 @@ class MainWindowProjectIo(object):
314
294
  self.statusBar().showMessage(f"JSON serialization error: {e}")
315
295
  except Exception as e:
316
296
  self.statusBar().showMessage(f"Error saving PME Project file: {e}")
317
- pass
318
297
 
319
298
  def load_json_data(self, file_path=None):
320
299
  """PME Projectファイル形式を読み込み"""
@@ -371,7 +350,6 @@ class MainWindowProjectIo(object):
371
350
  self.statusBar().showMessage(f"File I/O error: {e}")
372
351
  except Exception as e:
373
352
  self.statusBar().showMessage(f"Error loading PME Project file: {e}")
374
- pass
375
353
 
376
354
  def open_project_file(self, file_path=None):
377
355
  """プロジェクトファイルを開く(.pmeprjと.pmerawの両方に対応)"""
@@ -21,32 +21,17 @@ import traceback
21
21
  from rdkit import Chem
22
22
  from rdkit.Chem import AllChem
23
23
 
24
- try:
25
- pass
26
- except Exception: # pragma: no cover
27
- import traceback
28
-
29
- pass
30
-
31
24
  # PyQt6 Modules
32
25
  from PyQt6.QtCore import QPointF, QTimer
33
26
  from PyQt6.QtWidgets import QInputDialog
34
27
 
35
28
  try:
36
29
  from PyQt6 import sip as _sip # type: ignore
37
-
38
30
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
39
31
  except Exception:
40
32
  _sip = None
41
33
  _sip_isdeleted = None
42
34
 
43
- try:
44
- # package relative imports (preferred when running as `python -m moleditpy`)
45
- pass
46
- except Exception: # pragma: no cover
47
- # Fallback to absolute imports for script-style execution
48
- pass
49
-
50
35
 
51
36
  # --- クラス定義 ---
52
37
  class MainWindowStringImporters(object):
@@ -158,8 +143,6 @@ class MainWindowStringImporters(object):
158
143
  except Exception as e:
159
144
  self.statusBar().showMessage(f"Error loading from SMILES: {e}")
160
145
 
161
- pass
162
-
163
146
  def load_from_inchi(self, inchi_string):
164
147
  """InChI文字列から分子を読み込み、2Dエディタに表示する"""
165
148
  try:
@@ -18,14 +18,6 @@ MainWindow (main_window.py) から分離されたモジュール
18
18
 
19
19
  import vtk
20
20
 
21
- # RDKit imports (explicit to satisfy flake8 and used features)
22
- try:
23
- pass
24
- except Exception: # pragma: no cover
25
- import traceback
26
-
27
- pass
28
-
29
21
  # PyQt6 Modules
30
22
  from PyQt6.QtCore import QEvent, Qt, QTimer
31
23
  from PyQt6.QtWidgets import (
@@ -38,7 +30,6 @@ from PyQt6.QtWidgets import (
38
30
 
39
31
  try:
40
32
  from PyQt6 import sip as _sip # type: ignore
41
-
42
33
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
43
34
  except Exception:
44
35
  _sip = None
@@ -24,13 +24,6 @@ import vtk
24
24
  # RDKit imports (explicit to satisfy flake8 and used features)
25
25
  from rdkit import Chem
26
26
 
27
- try:
28
- pass
29
- except Exception: # pragma: no cover
30
- import traceback
31
-
32
- pass
33
-
34
27
  # PyQt6 Modules
35
28
  import pyvista as pv
36
29
  from PyQt6.QtCore import QRectF, Qt
@@ -39,7 +32,6 @@ from PyQt6.QtWidgets import QApplication, QGraphicsView
39
32
 
40
33
  try:
41
34
  from PyQt6 import sip as _sip # type: ignore
42
-
43
35
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
44
36
  except Exception:
45
37
  _sip = None
@@ -23,19 +23,11 @@ import traceback
23
23
  from rdkit import Chem
24
24
  from rdkit.Chem import AllChem
25
25
 
26
- try:
27
- pass
28
- except Exception: # pragma: no cover
29
- import traceback
30
-
31
- pass
32
-
33
26
  # PyQt6 Modules
34
27
  from PyQt6.QtWidgets import QFileDialog
35
28
 
36
29
  try:
37
30
  from PyQt6 import sip as _sip # type: ignore
38
-
39
31
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
40
32
  except Exception:
41
33
  _sip = None
@@ -163,8 +155,6 @@ class MainWindowViewLoaders(object):
163
155
  self.statusBar().showMessage(f"Error loading XYZ file: {e}")
164
156
  self.restore_ui_for_editing()
165
157
 
166
- pass
167
-
168
158
  def save_3d_as_mol(self):
169
159
  if not self.current_mol:
170
160
  self.statusBar().showMessage("Error: Please generate a 3D structure first.")
@@ -39,7 +39,6 @@ except Exception:
39
39
 
40
40
  try:
41
41
  from PyQt6 import sip as _sip # type: ignore
42
-
43
42
  _sip_isdeleted = getattr(_sip, "isdeleted", None)
44
43
  except Exception:
45
44
  _sip = None
File without changes