-
Notifications
You must be signed in to change notification settings - Fork 103
Reorder overloads to remove deprecation warning in pycharm #1901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR reorders the @overload definitions for the create method in both sync and async collection stub files to eliminate deprecation warnings in PyCharm. The change follows Python typing best practices by placing the most general (non-deprecated) overload first, followed by more specific deprecated overloads.
- Moved the non-deprecated overload (all parameters optional) to the first position
- Placed deprecated overloads (with required
vector_index_configorvectorizer_config) after the general overload - Swapped deprecation decorators and parameter requirements between overloads to maintain correct typing
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| weaviate/collections/collections/sync.pyi | Reordered three create method overloads: non-deprecated first, then two deprecated variants with specific required parameters |
| weaviate/collections/collections/async_.pyi | Applied the same overload reordering as sync.pyi to maintain consistency between sync and async implementations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1901 +/- ##
=======================================
Coverage 86.55% 86.55%
=======================================
Files 273 273
Lines 19769 19769
=======================================
Hits 17112 17112
Misses 2657 2657 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Removes the
deprecation warning when creating a collection without vector indices