Skip to content

Commit eb49873

Browse files
waltaskewaribray
andauthored
feat: Add More Specific Type Annotations for Row Dictionaries (#1295)
The keys must be strings as they represent column names. Update type annotations to reflect this. Co-authored-by: aribray <[email protected]>
1 parent 207aa50 commit eb49873

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

google/cloud/bigquery/client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3349,10 +3349,10 @@ def query(
33493349
def insert_rows(
33503350
self,
33513351
table: Union[Table, TableReference, str],
3352-
rows: Union[Iterable[Tuple], Iterable[Dict]],
3352+
rows: Union[Iterable[Tuple], Iterable[Mapping[str, Any]]],
33533353
selected_fields: Sequence[SchemaField] = None,
33543354
**kwargs,
3355-
) -> Sequence[dict]:
3355+
) -> Sequence[Dict[str, Any]]:
33563356
"""Insert rows into a table via the streaming API.
33573357
33583358
See
@@ -3470,7 +3470,7 @@ def insert_rows_from_dataframe(
34703470
def insert_rows_json(
34713471
self,
34723472
table: Union[Table, TableReference, TableListItem, str],
3473-
json_rows: Sequence[Dict],
3473+
json_rows: Sequence[Mapping[str, Any]],
34743474
row_ids: Union[
34753475
Iterable[Optional[str]], AutoRowIDs, None
34763476
] = AutoRowIDs.GENERATE_UUID,

0 commit comments

Comments
 (0)