Fix invalid-argument-type violations#841
Conversation
Deploying infrahub-sdk-python with
|
| Latest commit: |
b417aaf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://64a5f016.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://pog-timestamp-argument.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## infrahub-develop #841 +/- ##
=================================================
Coverage 80.59% 80.59%
=================================================
Files 118 118
Lines 10235 10235
Branches 1538 1538
=================================================
Hits 8249 8249
Misses 1456 1456
Partials 530 530
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
WalkthroughThis pull request modifies the 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
🧹 Nitpick comments (1)
infrahub_sdk/timestamp.py (1)
16-19: Nit: Typo inSubstractParamsclass name.
Substractshould beSubtract. While pre-existing and not introduced by this PR, since you're already touching the file it may be worth correcting it now.✏️ Proposed rename
-class SubstractParams(TypedDict): +class SubtractParams(TypedDict): seconds: NotRequired[float] minutes: NotRequired[float] hours: NotRequired[float]And update the usage at line 83:
- params: SubstractParams = {} + params: SubtractParams = {}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@infrahub_sdk/timestamp.py` around lines 16 - 19, Rename the misspelled TypedDict class SubstractParams to SubtractParams and update all references to it (e.g., type annotations or usages where SubstractParams is referenced such as the usage near the timestamp handling code) to use SubtractParams; ensure imports, type hints, and any stringified type names are updated consistently and run type checks to catch remaining references.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@infrahub_sdk/timestamp.py`:
- Around line 16-19: Rename the misspelled TypedDict class SubstractParams to
SubtractParams and update all references to it (e.g., type annotations or usages
where SubstractParams is referenced such as the usage near the timestamp
handling code) to use SubtractParams; ensure imports, type hints, and any
stringified type names are updated consistently and run type checks to catch
remaining references.
Why
Remove typing exceptions and fix violations
What changed
Cleanup of argument types in timestamp module.
Summary by CodeRabbit
Bug Fixes
Chores