概要
CLAUDE.md のルール:
dataclass(frozen=True, slots=True) で immutable value object(slots=True でメモリ効率化)
現在の状態:
| entity |
frozen |
slots |
Note |
✅ |
❌ |
Tag |
✅ |
✅ |
Comment |
✅ |
✅ |
src/example/note/entity.py:
@dataclass(frozen=True) # slots=True が欠落
class Note:
id: int
title: str
body: str
影響
対応
src/example/note/entity.py を @dataclass(frozen=True, slots=True) に変更する。
概要
CLAUDE.md のルール:
現在の状態:
NoteTagCommentsrc/example/note/entity.py:影響
対応
src/example/note/entity.pyを@dataclass(frozen=True, slots=True)に変更する。