Skip to content

Commit 811ab60

Browse files
committed
Remove unused code and add dead-code convention to CLAUDE.md
- Remove unused imports: QImage (items), QTransform, QGraphicsItem (scene) - Remove unused signal: zoom_requested (scene) - Add convention: delete all unused code immediately, no dead code allowed
1 parent a50fb85 commit 811ab60

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ python -m pybreeze # launch the IDE
8484
- Exception hierarchy: all custom exceptions inherit from `ITEException`
8585
- Logging: use `pybreeze_logger` from `pybreeze.utils.logging.logger`
8686
- Plugin API: `register_programming_language()` and `register_natural_language()` from `je_editor.plugins`
87+
- Delete all unused code — do not leave dead imports, unreachable functions, commented-out blocks, or unused variables. If code is not called by any execution path, remove it entirely. No `# TODO: remove later` or `_old_` prefixes — delete immediately.
8788

8889
## Security
8990

pybreeze/pybreeze_ui/diagram_editor/diagram_items.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
QBrush,
99
QColor,
1010
QFont,
11-
QImage,
1211
QPainter,
1312
QPainterPath,
1413
QPen,

pybreeze/pybreeze_ui/diagram_editor/diagram_scene.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from enum import Enum, auto
55

66
from PySide6.QtCore import QPointF, Qt, Signal
7-
from PySide6.QtGui import QColor, QPen, QPixmap, QTransform, QUndoStack
8-
from PySide6.QtWidgets import QGraphicsItem, QGraphicsLineItem, QGraphicsScene, QMenu
7+
from PySide6.QtGui import QColor, QPen, QPixmap, QUndoStack
8+
from PySide6.QtWidgets import QGraphicsLineItem, QGraphicsScene, QMenu
99

1010
from pybreeze.pybreeze_ui.diagram_editor.diagram_commands import DiagramSnapshotCommand
1111
from pybreeze.pybreeze_ui.diagram_editor.diagram_items import (
@@ -42,7 +42,6 @@ class DiagramScene(QGraphicsScene):
4242

4343
mode_changed = Signal(ToolMode)
4444
item_count_changed = Signal()
45-
zoom_requested = Signal(float) # emitted when scene wants to change zoom
4645

4746
def __init__(self, parent=None):
4847
super().__init__(parent)

0 commit comments

Comments
 (0)