fix: Python 3.9 compatibility for union type hints
Use Optional[T] + from __future__ import annotations instead of T | None syntax which requires Python 3.10+. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
"""Embedding generation and Oracle vector store insertion."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import array
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
from typing import Generator
|
||||
from typing import Generator, Optional
|
||||
|
||||
import oci
|
||||
import oracledb
|
||||
@@ -14,7 +16,7 @@ from oci.generative_ai_inference.models import (
|
||||
)
|
||||
|
||||
# Reuse same pool as queue_db but connect to same ADB instance
|
||||
_pool: oracledb.ConnectionPool | None = None
|
||||
_pool: Optional[oracledb.ConnectionPool] = None
|
||||
|
||||
|
||||
def _get_pool() -> oracledb.ConnectionPool:
|
||||
|
||||
Reference in New Issue
Block a user