Skip to content

feat: FT207 collections — namedtuple / defaultdict / Counter / deque#575

Merged
hideyukiMORI merged 1 commit into
mainfrom
feat/574-ft207-collections
May 22, 2026
Merged

feat: FT207 collections — namedtuple / defaultdict / Counter / deque#575
hideyukiMORI merged 1 commit into
mainfrom
feat/574-ft207-collections

Conversation

@hideyukiMORI
Copy link
Copy Markdown
Owner

Summary

  • namedtuple: Point / RGB 軽量 Value Object — API 境界は dataclass(frozen=True, slots=True) で型安全に
  • defaultdict: 単語頻度集計 / 先頭文字グループ化 — 返却は必ず dict(...) に変換
  • Counter: 文字頻度集計 / 差分計算 — - 演算は 0 以下を自動除去(subtract() との違い確認)
  • deque: 双方向キュー操作 / 固定容量リングバッファ — maxlen 上限 10,000 設定
  • セキュリティ診断合格(207 % 3 = 0): 全入力 max_length 制限・外部リソースアクセスなし
  • 29 tests passed / mypy strict / ruff clean

Closes #574

Test plan

  • uv run pytest — 29 passed in sandbox
  • uv run mypy — no issues
  • uv run ruff check / ruff format --check — all passed
  • セキュリティ診断: 全カテゴリ合格
  • メインプロジェクト: 456 tests passed, 93.98% coverage

🤖 Generated with Claude Code

…loses #574)

- namedtuple: Point / RGB 軽量 Value Object(API 境界は dataclass で型安全に)
- defaultdict: 単語頻度集計・先頭文字グループ化(返却は dict 変換を徹底)
- Counter: 文字頻度集計・差分計算(- 演算は 0 以下除去を確認)
- deque: 双方向キュー操作・固定容量リングバッファ(maxlen 上限 10000 設定)
- セキュリティ診断合格(207 % 3 = 0): 全入力制限・インジェクションなし
- 29 tests passed / mypy strict / ruff clean

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hideyukiMORI hideyukiMORI merged commit 98a8b8e into main May 22, 2026
2 checks passed
@hideyukiMORI hideyukiMORI deleted the feat/574-ft207-collections branch May 22, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FT207: collections モジュール — namedtuple / defaultdict / Counter / deque

1 participant