Add input_model field support to cli_doc marker#2805
Conversation
|
Warning Rate limit exceeded@koxudaxi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 19 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a public TypedDict Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/conftest.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: py312-isort7 on Ubuntu
- GitHub Check: py312-black24 on Ubuntu
- GitHub Check: py312-black22 on Ubuntu
- GitHub Check: py312-black23 on Ubuntu
- GitHub Check: py312-isort6 on Ubuntu
- GitHub Check: 3.10 on Ubuntu
- GitHub Check: 3.10 on Windows
- GitHub Check: 3.10 on macOS
- GitHub Check: py312-isort5 on Ubuntu
- GitHub Check: 3.11 on Windows
- GitHub Check: 3.12 on Windows
- GitHub Check: 3.14 on macOS
- GitHub Check: 3.13 on Ubuntu
- GitHub Check: 3.14 on Windows
- GitHub Check: 3.13 on macOS
- GitHub Check: 3.12 on Ubuntu
- GitHub Check: 3.11 on Ubuntu
- GitHub Check: benchmarks
- GitHub Check: Analyze (python)
🔇 Additional comments (1)
tests/conftest.py (1)
69-74: LGTM! Logic forinput_modelalternative is correct.The required-fields validation correctly treats
input_modelas an alternative toinput_schemaandconfig_content, and the error message accurately reflects all available options.
CodSpeed Performance ReportMerging #2805 will not alter performanceComparing Summary
Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2805 +/- ##
=======================================
Coverage 99.51% 99.51%
=======================================
Files 89 89
Lines 13745 13758 +13
Branches 1619 1619
=======================================
+ Hits 13678 13691 +13
Misses 36 36
Partials 31 31
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/conftest.py (1)
67-67: Clean up thenoqadirective.According to static analysis,
PLR0912andPLR0914are not enabled and can be removed from thenoqadirective.🔎 Proposed fix
-def _validate_cli_doc_marker(node_id: str, kwargs: CliDocKwargs) -> list[str]: # noqa: ARG001, PLR0912, PLR0914 # pragma: no cover +def _validate_cli_doc_marker(node_id: str, kwargs: CliDocKwargs) -> list[str]: # noqa: ARG001 # pragma: no cover
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/conftest.py
🧰 Additional context used
🪛 Ruff (0.14.10)
tests/conftest.py
67-67: Unused noqa directive (non-enabled: PLR0912, PLR0914)
Remove unused noqa directive
(RUF100)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: py312-black24 on Ubuntu
- GitHub Check: py312-isort5 on Ubuntu
- GitHub Check: py312-black22 on Ubuntu
- GitHub Check: py312-isort7 on Ubuntu
- GitHub Check: py312-pydantic1 on Ubuntu
- GitHub Check: 3.11 on macOS
- GitHub Check: 3.11 on Windows
- GitHub Check: py312-black23 on Ubuntu
- GitHub Check: 3.12 on Ubuntu
- GitHub Check: 3.12 on Windows
- GitHub Check: py312-isort6 on Ubuntu
- GitHub Check: 3.12 on macOS
- GitHub Check: 3.14 on macOS
- GitHub Check: 3.14 on Ubuntu
- GitHub Check: 3.11 on Ubuntu
- GitHub Check: 3.13 on Ubuntu
- GitHub Check: 3.13 on Windows
- GitHub Check: 3.14 on Windows
- GitHub Check: benchmarks
- GitHub Check: Analyze (python)
🔇 Additional comments (5)
tests/conftest.py (5)
12-12: LGTM!The added imports (
Required,TypedDict,cast) are necessary for the newCliDocKwargsTypedDict and type casting functionality.
28-42: LGTM!The
CliDocKwargsTypedDict properly formalizes the marker kwargs structure with appropriate use ofRequiredfor mandatory fields (options,cli_args) and optional typing for the rest, including the newinput_modelfield.
85-90: LGTM!The validation logic correctly treats
input_modelas an alternative toinput_schemaandconfig_content, with a clear error message explaining the requirement.
113-120: LGTM!The format validation for
input_modelis thorough and correctly addresses the concern from the past review comment. It now:
- Validates the type is a string
- Splits on the first
":"- Ensures exactly two parts exist
- Verifies both parts are non-empty after stripping whitespace
This prevents invalid formats like
":","module:",":name", or whitespace-only parts.
191-191: LGTM!The
casttoCliDocKwargsis appropriate here. It's a type hint for static analysis while the actual runtime validation occurs in_validate_cli_doc_marker, ensuring type safety.
Breaking Change AnalysisResult: No breaking changes detected Reasoning: PR #2805 modifies only internal test infrastructure in tests/conftest.py. It adds a new optional This analysis was performed by Claude Code Action |
Summary by CodeRabbit
New Features
input_modelfield as an accepted alternative in CLI documentation markers.module:nameformatting forinput_modelwhen provided.Tests
input_modelrequirements.✏️ Tip: You can customize this high-level summary in your review settings.