Skip to content

Commit

Permalink
feat: Add More Specific Type Annotations for Row Dictionaries (google…
Browse files Browse the repository at this point in the history
…apis#1295)

The keys must be strings as they represent column names. Update type annotations
to reflect this.

Co-authored-by: aribray <45905583+aribray@users.noreply.github.com>
  • Loading branch information
2 people authored and abdelmegahedgoogle committed Apr 17, 2023
1 parent 0bdd8a1 commit 1215aa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions google/cloud/bigquery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3349,10 +3349,10 @@ def query(
def insert_rows(
self,
table: Union[Table, TableReference, str],
rows: Union[Iterable[Tuple], Iterable[Dict]],
rows: Union[Iterable[Tuple], Iterable[Mapping[str, Any]]],
selected_fields: Sequence[SchemaField] = None,
**kwargs,
) -> Sequence[dict]:
) -> Sequence[Dict[str, Any]]:
"""Insert rows into a table via the streaming API.
See
Expand Down Expand Up @@ -3470,7 +3470,7 @@ def insert_rows_from_dataframe(
def insert_rows_json(
self,
table: Union[Table, TableReference, TableListItem, str],
json_rows: Sequence[Dict],
json_rows: Sequence[Mapping[str, Any]],
row_ids: Union[
Iterable[Optional[str]], AutoRowIDs, None
] = AutoRowIDs.GENERATE_UUID,
Expand Down

0 comments on commit 1215aa6

Please sign in to comment.