Skip to content

Commit 51a1e7b

Browse files
committed
INTPYTHON-5658 Remove py39 fallback from typing.TypeAlias
1 parent 5166bea commit 51a1e7b

File tree

1 file changed

+1
-6
lines changed
  • libs/langchain-mongodb/langchain_mongodb/graphrag

1 file changed

+1
-6
lines changed

libs/langchain-mongodb/langchain_mongodb/graphrag/graph.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44
import logging
55
from copy import deepcopy
6-
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
6+
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, TypeAlias, Union
77

88
from langchain_core.documents import Document
99
from langchain_core.language_models.chat_models import BaseChatModel
@@ -21,11 +21,6 @@
2121
from .schema import entity_schema
2222

2323
if TYPE_CHECKING:
24-
try:
25-
from typing import TypeAlias # type:ignore[attr-defined] # Python 3.10+
26-
except ImportError: # Python 3.9 fallback # TODO Remove [PYTHON-5658]
27-
from typing_extensions import TypeAlias
28-
2924
Entity: TypeAlias = Dict[str, Any]
3025
"""Represents an Entity in the knowledge graph with specific schema. See .schema"""
3126

0 commit comments

Comments
 (0)