From 5c149802b50d5309fed848492ac97627f6a03a91 Mon Sep 17 00:00:00 2001 From: Daniel Porter Date: Wed, 22 May 2024 11:10:47 +0100 Subject: [PATCH] No longer cast issues result in examples/auth.py As the correct type hint is now provided, this is no longer necessary. --- examples/auth.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/auth.py b/examples/auth.py index cda716403..2cb53a8f5 100644 --- a/examples/auth.py +++ b/examples/auth.py @@ -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 @@ -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)