diff --git a/backend/danswer/connectors/cross_connector_utils/miscellaneous_utils.py b/backend/danswer/connectors/cross_connector_utils/miscellaneous_utils.py index 897503dca99..1b79c4a4faf 100644 --- a/backend/danswer/connectors/cross_connector_utils/miscellaneous_utils.py +++ b/backend/danswer/connectors/cross_connector_utils/miscellaneous_utils.py @@ -11,6 +11,10 @@ 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]]: