Skip to content

Commit

Permalink
Update annotation for client.execute_batch, get_execution_result argu…
Browse files Browse the repository at this point in the history
…ment.

client.execute_batch  was showing "No overload for provided arguments" in Pylance for vscode. Had to provide argument for get_execution_result to suppress error. Update overloads to have default values to overcome this.
  • Loading branch information
rahul-gj authored Jun 12, 2024
1 parent 2363698 commit e6d5b87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gql/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def execute_batch(
*,
serialize_variables: Optional[bool] = None,
parse_result: Optional[bool] = None,
get_execution_result: Literal[False],
get_execution_result: Literal[False] = False,
**kwargs,
) -> List[Dict[str, Any]]:
... # pragma: no cover
Expand All @@ -510,7 +510,7 @@ def execute_batch(
*,
serialize_variables: Optional[bool] = None,
parse_result: Optional[bool] = None,
get_execution_result: Literal[True],
get_execution_result: Literal[True] = True,
**kwargs,
) -> List[ExecutionResult]:
... # pragma: no cover
Expand Down

0 comments on commit e6d5b87

Please sign in to comment.