Skip to content

Commit

Permalink
Avoid boolean trap in search_issues
Browse files Browse the repository at this point in the history
We now require json_result and use_post are passed as keyword arguments,
satisfying type checker requirements and handling the default return
value correctly.
  • Loading branch information
Stealthii committed May 22, 2024
1 parent 8221374 commit b47f3d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3495,6 +3495,7 @@ def search_issues(
fields: str | list[str] | None = "*all",
expand: str | None = None,
properties: str | None = None,
*,
json_result: Literal[False] = False,
use_post: bool = False,
) -> ResultList[Issue]: ...
Expand All @@ -3509,7 +3510,8 @@ def search_issues(
fields: str | list[str] | None = "*all",
expand: str | None = None,
properties: str | None = None,
json_result: Literal[True] = True,
*,
json_result: Literal[True],
use_post: bool = False,
) -> dict[str, Any]: ...

Expand All @@ -3522,6 +3524,7 @@ def search_issues(
fields: str | list[str] | None = "*all",
expand: str | None = None,
properties: str | None = None,
*,
json_result: bool = False,
use_post: bool = False,
) -> dict[str, Any] | ResultList[Issue]:
Expand Down

0 comments on commit b47f3d0

Please sign in to comment.