extract_deprecated_lookup() — langchain Function Reference
Architecture documentation for the extract_deprecated_lookup() function in test_imports.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 97d4d94c_65f3_c42b_7930_3764d443c63a["extract_deprecated_lookup()"] 1a4ae21b_d553_aa88_bac6_fd6971a4e02d["test_imports.py"] 97d4d94c_65f3_c42b_7930_3764d443c63a -->|defined in| 1a4ae21b_d553_aa88_bac6_fd6971a4e02d 259c1875_6b99_3d5e_ea98_57f1d0b4bb46["test_no_more_changes_to_proxy_community()"] 259c1875_6b99_3d5e_ea98_57f1d0b4bb46 -->|calls| 97d4d94c_65f3_c42b_7930_3764d443c63a ed754162_a014_59bf_8b3f_a17462a35481["_dict_from_ast()"] 97d4d94c_65f3_c42b_7930_3764d443c63a -->|calls| ed754162_a014_59bf_8b3f_a17462a35481 style 97d4d94c_65f3_c42b_7930_3764d443c63a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/test_imports.py lines 111–133
def extract_deprecated_lookup(file_path: str) -> dict[str, Any] | None:
"""Detect and extracts the value of a dictionary named `DEPRECATED_LOOKUP`.
This variable is located in the global namespace of a Python file.
Args:
file_path: The path to the Python file.
Returns:
The value of `DEPRECATED_LOOKUP` if it exists, `None` otherwise.
"""
tree = ast.parse(Path(file_path).read_text(encoding="utf-8"), filename=file_path)
for node in ast.walk(tree):
if isinstance(node, ast.Assign):
for target in node.targets:
if (
isinstance(target, ast.Name)
and target.id == "DEPRECATED_LOOKUP"
and isinstance(node.value, ast.Dict)
):
return _dict_from_ast(node.value)
return None
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does extract_deprecated_lookup() do?
extract_deprecated_lookup() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/test_imports.py.
Where is extract_deprecated_lookup() defined?
extract_deprecated_lookup() is defined in libs/langchain/tests/unit_tests/test_imports.py at line 111.
What does extract_deprecated_lookup() call?
extract_deprecated_lookup() calls 1 function(s): _dict_from_ast.
What calls extract_deprecated_lookup()?
extract_deprecated_lookup() is called by 1 function(s): test_no_more_changes_to_proxy_community.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free