You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by to...@apache.org on 2022/07/31 10:54:32 UTC
[lucene-jira-archive] branch main updated: fix a few type errors identified by mypy (#101)
This is an automated email from the ASF dual-hosted git repository.
tomoko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git
The following commit(s) were added to refs/heads/main by this push:
new 75251c2e fix a few type errors identified by mypy (#101)
75251c2e is described below
commit 75251c2e3d27ce78938b11d57ce635c32c6dfaa3
Author: Michael McCandless <mi...@apache.org>
AuthorDate: Sun Jul 31 06:54:29 2022 -0400
fix a few type errors identified by mypy (#101)
---
migration/src/jira_util.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/src/jira_util.py b/migration/src/jira_util.py
index 83ab00e8..b9e6fc04 100644
--- a/migration/src/jira_util.py
+++ b/migration/src/jira_util.py
@@ -61,7 +61,7 @@ def extract_priority(o: dict) -> Optional[str]:
return None
-def extract_vote_count(o: dict) -> Optional[str]:
+def extract_vote_count(o: dict) -> Optional[int]:
votes = o.get("fields").get("votes")
if votes:
vote_count = votes.get("votes")
@@ -84,7 +84,7 @@ def extract_assignee(o: dict) -> tuple[str, str]:
return (name, disp_name)
-def extract_parent_key(o: dict) -> str:
+def extract_parent_key(o: dict) -> Optional[str]:
parent = o["fields"].get("parent")
if parent:
key = parent["key"]
@@ -163,7 +163,7 @@ def extract_subtasks(o: dict) -> list[str]:
return [x.get("key", "") for x in o.get("fields").get("subtasks", [])]
-def extract_comments(o: dict) -> list[str, str, str, str, str]:
+def extract_comments(o: dict) -> list[tuple[str, str, str, str, str, str]]:
comments = o.get("fields").get("comment", {}).get("comments", [])
if not comments:
return []