File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2424import typing
2525from typing import (
2626 Any ,
27- Callable ,
2827 Dict ,
2928 IO ,
3029 Iterable ,
@@ -504,6 +503,9 @@ def _read_gbq_colab(
504503 * ,
505504 pyformat_args : Optional [Dict [str , Any ]] = None ,
506505 dry_run : bool = False ,
506+ callback : abc .Callable [
507+ [Any ], None
508+ ] = lambda _ : None , # TODO: use an Event class not Any.
507509 ) -> Union [dataframe .DataFrame , pandas .Series ]:
508510 """A version of read_gbq that has the necessary default values for use in colab integrations.
509511
@@ -535,6 +537,7 @@ def _read_gbq_colab(
535537 index_col = bigframes .enums .DefaultIndexKind .NULL ,
536538 force_total_order = False ,
537539 dry_run = typing .cast (Union [Literal [False ], Literal [True ]], dry_run ),
540+ callback = callback ,
538541 )
539542
540543 @overload
@@ -992,7 +995,7 @@ def read_csv(
992995 pandas .Series ,
993996 pandas .Index ,
994997 np .ndarray [Any , Any ],
995- Callable [[Any ], bool ],
998+ abc . Callable [[Any ], bool ],
996999 ]
9971000 ] = None ,
9981001 dtype : Optional [Dict ] = None ,
Original file line number Diff line number Diff line change 1414
1515from __future__ import annotations
1616
17+ from collections import abc
1718import copy
1819import dataclasses
1920import datetime
2223import os
2324import typing
2425from typing import (
26+ Any ,
2527 Dict ,
2628 Generator ,
2729 Hashable ,
@@ -743,6 +745,9 @@ def read_gbq_query(
743745 filters : third_party_pandas_gbq .FiltersType = (),
744746 dry_run : bool = False ,
745747 force_total_order : Optional [bool ] = None ,
748+ callback : abc .Callable [
749+ [Any ], None
750+ ] = lambda _ : None , # TODO: use an Event class not Any.
746751 ) -> dataframe .DataFrame | pandas .Series :
747752 import bigframes .dataframe as dataframe
748753
You can’t perform that action at this time.
0 commit comments