-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
typing: Remove organization_releases API from soft list #104154
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #104154 +/- ##
============================================
+ Coverage 65.84% 80.60% +14.76%
============================================
Files 9322 9325 +3
Lines 398047 398296 +249
Branches 25477 25453 -24
============================================
+ Hits 262086 321060 +58974
+ Misses 135508 76782 -58726
- Partials 453 454 +1 |
|
|
||
| def get_projects(self, request: Request, organization, project_ids=None, project_slugs=None): | ||
| # Since we are not trying to override the top-levelget_projects function, we need to type ignore the override | ||
| def get_projects( # type: ignore[override] |
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.
Mypy thinks we're trying to override this which we are not:
sentry/src/sentry/api/bases/organization.py
Lines 354 to 362 in 9120ec2
| def get_projects( | |
| self, | |
| request: HttpRequest, | |
| organization: Organization | RpcOrganization, | |
| force_global_perms: bool = False, | |
| include_all_accessible: bool = False, | |
| project_ids: set[int] | None = None, | |
| project_slugs: set[str] | None = None, | |
| ) -> list[Project]: |
| elif sort == "semver": | ||
| queryset = queryset.annotate_prerelease_column() | ||
|
|
||
| order_by = [F(col).desc(nulls_last=True) for col in Release.SEMVER_COLS] |
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.
In this block, order_by is a list while it's not in the next block, thus, creating different variable names.
| self, | ||
| limit: int = 100, | ||
| cursor: Cursor | None = None, | ||
| count_hits: bool = False, |
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.
These three parameters are not used, however, it needs to match the signature from the base class:
sentry/src/sentry/api/paginator.py
Lines 259 to 266 in 4d0c923
| def get_result( | |
| self, | |
| limit: int = 100, | |
| cursor: Cursor | None = None, | |
| count_hits: bool = False, | |
| known_hits: int | None = None, | |
| max_hits: int | None = None, | |
| ) -> CursorResult[Any]: |
No description provided.