Skip to content

Commit

Permalink
chore(issues): Enable stronger typing on two endpoints
Browse files Browse the repository at this point in the history
This is another quick follow up to #69828 since these two type errors
are trivial to resolve.
  • Loading branch information
mrduncan committed May 7, 2024
1 parent e624ee9 commit 3a56605
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ module = [
"sentry.issues.constants",
"sentry.issues.endpoints",
"sentry.issues.endpoints.group_events",
"sentry.issues.endpoints.organization_activity",
"sentry.issues.endpoints.organization_release_previous_commits",
"sentry.issues.endpoints.project_stacktrace_link",
"sentry.issues.escalating_group_forecast",
"sentry.issues.escalating_issues_alg",
Expand Down
6 changes: 5 additions & 1 deletion src/sentry/issues/endpoints/organization_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from sentry.api.paginator import DateTimePaginator
from sentry.api.serializers import OrganizationActivitySerializer, serialize
from sentry.models.activity import Activity
from sentry.models.organization import Organization
from sentry.models.organizationmember import OrganizationMember
from sentry.models.organizationmemberteam import OrganizationMemberTeam
from sentry.models.project import Project
from sentry.types.activity import ActivityType
Expand All @@ -28,7 +30,9 @@ class OrganizationActivityEndpoint(OrganizationMemberEndpoint, EnvironmentMixin)
"Activities for each issue at 'GET /api/0/organizations/{organization_slug}/issues/{issue_id}/activities/'",
"api.organization-activity.brownout",
)
def get(self, request: Request, organization, member) -> Response:
def get(
self, request: Request, organization: Organization, member: OrganizationMember
) -> Response:
# There is an activity record created for both sides of the unmerge
# operation, so we only need to include one of them here to avoid
# showing the same entry twice.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint
from sentry.api.exceptions import ResourceDoesNotExist
from sentry.api.serializers import serialize
from sentry.models.organization import Organization
from sentry.models.release import Release
from sentry.ratelimits.config import RateLimitConfig

Expand All @@ -20,7 +21,7 @@ class OrganizationReleasePreviousCommitsEndpoint(OrganizationReleasesBaseEndpoin
owner = ApiOwner.ISSUES
rate_limits = RateLimitConfig(group="CLI")

def get(self, request: Request, organization, version) -> Response:
def get(self, request: Request, organization: Organization, version: str) -> Response:
"""
Retrieve an Organization's Most Recent Release with Commits
````````````````````````````````````````````````````````````
Expand Down

0 comments on commit 3a56605

Please sign in to comment.