Backport Test (#2966)

This commit is contained in:
Yuhong Sun 2024-10-27 19:00:37 -07:00 committed by GitHub
parent 1a31f1e773
commit 9270782c49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,10 @@ from danswer.connectors.models import BasicExpertInfo
from danswer.utils.text_processing import is_valid_email
T = TypeVar("T")
U = TypeVar("U")
def datetime_to_utc(dt: datetime) -> datetime:
if dt.tzinfo is None or dt.tzinfo.utcoffset(dt) is None:
dt = dt.replace(tzinfo=timezone.utc)
@ -49,10 +53,6 @@ def get_experts_stores_representations(
return [owner for owner in reps if owner is not None]
T = TypeVar("T")
U = TypeVar("U")
def process_in_batches(
objects: list[T], process_function: Callable[[T], U], batch_size: int
) -> Iterator[list[U]]: