Skip to content

feat: FT213 abc モジュール — ABC / abstractmethod / register / __subclasshook__#597

Merged
hideyukiMORI merged 1 commit into
mainfrom
feat/596-ft213-abc
May 22, 2026
Merged

feat: FT213 abc モジュール — ABC / abstractmethod / register / __subclasshook__#597
hideyukiMORI merged 1 commit into
mainfrom
feat/596-ft213-abc

Conversation

@hideyukiMORI
Copy link
Copy Markdown
Owner

Summary

  • ShapeInterface(ABC): abstractmethod + __subclasshook__ による構造的サブタイピング
  • LegacyPolygon: register() による仮想サブクラス登録(isinstance / issubclass の動作を検証)
  • FormatterInterface(ABC): @final format_all + abstractmethod format_entry
  • get_abstract_methods(): __abstractmethods__ 属性の実行時イントロスペクション
  • セキュリティ診断(F-2 HIGH): Infinity/NaN 非標準 JSON → 500 DoS を発見・修正(FT212 と同一パターン)

Test plan

  • 30 テスト全通過 (pytest)
  • mypy --strict 通過
  • ruff check / ruff format --check 通過
  • pip-audit — 既知 CVE なし
  • セキュリティ診断: Infinity/NaN DoS 修正済み → 422 を確認

Closes #596

🤖 Generated with Claude Code

…ook__ (#596)

- ShapeInterface(ABC): abstractmethod + __subclasshook__ による構造的サブタイピング
- LegacyPolygon: register() による仮想サブクラス登録 (isinstance/issubclass 動作確認)
- FormatterInterface(ABC): @Final format_all + abstractmethod format_entry
- get_abstract_methods(): __abstractmethods__ 実行時イントロスペクション
- セキュリティ診断 (F-2 HIGH): Infinity/NaN 非標準 JSON → 500 DoS を発見・修正
  _sanitize_value() + カスタム RequestValidationError ハンドラーで 422 に修正
- 30 テスト全通過、mypy --strict / ruff / pip-audit 全クリア
- v1.8.89 → v1.8.90

Closes #596

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hideyukiMORI hideyukiMORI merged commit 6ad7e71 into main May 22, 2026
@hideyukiMORI hideyukiMORI deleted the feat/596-ft213-abc branch May 22, 2026 14:53
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.

FT213: abc モジュール — ABC / abstractmethod / register / __subclasshook__

1 participant