Browse Source

ref: fix typing for sentry.integrations.jira*.search (#62431)

<!-- Describe your PR here. -->
anthony sottile 1 year ago
parent
commit
f151e12ce7

+ 0 - 2
pyproject.toml

@@ -341,7 +341,6 @@ module = [
     "sentry.integrations.gitlab.webhooks",
     "sentry.integrations.jira.actions.form",
     "sentry.integrations.jira.client",
-    "sentry.integrations.jira.endpoints.search",
     "sentry.integrations.jira.integration",
     "sentry.integrations.jira.views.base",
     "sentry.integrations.jira.views.sentry_issue_details",
@@ -349,7 +348,6 @@ module = [
     "sentry.integrations.jira.webhooks.issue_updated",
     "sentry.integrations.jira_server.client",
     "sentry.integrations.jira_server.integration",
-    "sentry.integrations.jira_server.search",
     "sentry.integrations.jira_server.webhooks",
     "sentry.integrations.manager",
     "sentry.integrations.message_builder",

+ 6 - 1
src/sentry/integrations/jira/utils/choice.py

@@ -1,4 +1,9 @@
-def build_user_choice(user_response, user_id_field):
+from __future__ import annotations
+
+from typing import Any
+
+
+def build_user_choice(user_response: dict[str, Any], user_id_field: str) -> tuple[str, str] | None:
     """
     Build an (id, label) tuple from the given Jira REST API User resource,
     or return None if a tuple could not be built.

+ 6 - 1
src/sentry/integrations/jira_server/utils/choice.py

@@ -1,4 +1,9 @@
-def build_user_choice(user_response, user_id_field):
+from __future__ import annotations
+
+from typing import Any
+
+
+def build_user_choice(user_response: dict[str, Any], user_id_field: str) -> tuple[str, str] | None:
     """
     Build an (id, label) tuple from the given Jira REST API User resource,
     or return None if a tuple could not be built.