refactor(#148): FastAPI の依存/パラメータを Annotated 形式に統一 - #213
Merged
Conversation
- Depends/Query/Header をデフォルト値へ直接代入する旧形式を廃止し、 Annotated[T, ...] 形式に統一 - DI (Depends) 系の引数は関数シグネチャの先頭に配置し、依存関係が 一目で分かるように並び替え Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bobtaroh
requested review from
koki-fore and
kuu13580
and removed request for
a team
August 1, 2026 01:13
📝 WalkthroughWalkthroughChangesAnnotated依存性注入への移行
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Visit the preview URL for this PR (updated for commit a7d7273): https://tabi-share-8ef6b--pr213-refactor-fastapi-ann-negupvgg.web.app (expires Sat, 08 Aug 2026 01:14:40 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 9f2a87ede127df7673322845e34cf22c1372d720 |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
FastAPI の依存/パラメータをすべて
Annotated形式に統一する。詳細
Depends/Query/Headerをデフォルト値へ直接代入する旧形式(x: T = Depends(...))を廃止し、x: Annotated[T, Depends(...)]形式に統一(main.py/auth.py/routers/*.py)Depends) 系の引数は関数シグネチャの先頭に配置し、依存関係が一目で分かるように並び替え動作確認
uv run ruff check app/— passapp.openapi()によるスモークテスト(DIグラフ・引数順の破綻を検出)— 11 paths, 25 routes で成功確認項目
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com