pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.91k stars 856 forks source link

Provide overload type hints for search_issues variants #1861

Open Stealthii opened 1 month ago

Stealthii commented 1 month ago

search_issues can return either a dictionary (if json_result) or a list of Issues under default behavior.

This change provides separate hints using overload so that type checked code doesn't need to cast unnecessarily when dealing with output.

Tests have been added, and cases where casting was used have been removed.

Fixes #1608.

Stealthii commented 1 month ago

The cloud / py3.8 job seems to be failing for all PRs, unrelated to the changes provided here.

filbranden commented 2 days ago

Looks awesome! Would be nice if this was merged, I run into issues having to cast this every time I use it