Skip to content

Commit

Permalink
No longer cast issues result in examples/auth.py
Browse files Browse the repository at this point in the history
As the correct type hint is now provided, this is no longer necessary.
  • Loading branch information
Stealthii committed May 22, 2024
1 parent b47f3d0 commit 5c14980
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

from collections import Counter
from typing import cast

from jira import JIRA
from jira.client import ResultList
Expand All @@ -25,9 +24,7 @@
props = jira.application_properties()

# Find all issues reported by the admin
# Note: we cast() for mypy's benefit, as search_issues can also return the raw json !
# This is if the following argument is used: `json_result=True`
issues = cast(ResultList[Issue], jira.search_issues("assignee=admin"))
issues: ResultList[Issue] = jira.search_issues("assignee=admin")

# Find the top three projects containing issues reported by admin
top_three = Counter([issue.fields.project.key for issue in issues]).most_common(3)

0 comments on commit 5c14980

Please sign in to comment.