check_imports.py — langchain Source File
Architecture documentation for check_imports.py, a python file in the langchain codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 88e0faf2_2209_b9b6_8b1e_264c19cdfc6f["check_imports.py"] d33d86db_0d65_0c4a_5ba6_a863c29fa1c9["random"] 88e0faf2_2209_b9b6_8b1e_264c19cdfc6f --> d33d86db_0d65_0c4a_5ba6_a863c29fa1c9 b95bdb4f_719f_67c2_db8f_4a67783a7d72["string"] 88e0faf2_2209_b9b6_8b1e_264c19cdfc6f --> b95bdb4f_719f_67c2_db8f_4a67783a7d72 02625e10_fb78_7ecd_1ee2_105ee470faf5["sys"] 88e0faf2_2209_b9b6_8b1e_264c19cdfc6f --> 02625e10_fb78_7ecd_1ee2_105ee470faf5 442f7132_b1f7_9013_9836_ccf94893efcd["traceback"] 88e0faf2_2209_b9b6_8b1e_264c19cdfc6f --> 442f7132_b1f7_9013_9836_ccf94893efcd e179ee96_53c6_c731_4490_6ac8a2fb2137["importlib.machinery"] 88e0faf2_2209_b9b6_8b1e_264c19cdfc6f --> e179ee96_53c6_c731_4490_6ac8a2fb2137 style 88e0faf2_2209_b9b6_8b1e_264c19cdfc6f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Script to check if python modules can be imported."""
import random
import string
import sys
import traceback
from importlib.machinery import SourceFileLoader
if __name__ == "__main__":
files = sys.argv[1:]
has_failure = False
for file in files:
try:
module_name = "".join(
random.choice(string.ascii_letters) for _ in range(20)
)
SourceFileLoader(module_name, file).load_module()
except Exception:
has_failure = True
print(file) # noqa: T201
traceback.print_exc()
print() # noqa: T201
sys.exit(1 if has_failure else 0)
Domain
Subdomains
Functions
Dependencies
- importlib.machinery
- random
- string
- sys
- traceback
Source
Frequently Asked Questions
What does check_imports.py do?
check_imports.py is a source file in the langchain codebase, written in python. It belongs to the LangChainCore domain, ApiManagement subdomain.
What functions are defined in check_imports.py?
check_imports.py defines 1 function(s): files.
What does check_imports.py depend on?
check_imports.py imports 5 module(s): importlib.machinery, random, string, sys, traceback.
Where is check_imports.py in the architecture?
check_imports.py is located at libs/core/scripts/check_imports.py (domain: LangChainCore, subdomain: ApiManagement, directory: libs/core/scripts).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free