mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 23:54:14 +00:00
infra: import checking bugfix (#14569)
This commit is contained in:
parent
8bdaf55e92
commit
0a9d933bb2
@ -1,3 +1,5 @@
|
|||||||
|
import random
|
||||||
|
import string
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from importlib.machinery import SourceFileLoader
|
from importlib.machinery import SourceFileLoader
|
||||||
@ -7,9 +9,12 @@ if __name__ == "__main__":
|
|||||||
has_failure = False
|
has_failure = False
|
||||||
for file in files:
|
for file in files:
|
||||||
try:
|
try:
|
||||||
SourceFileLoader("x", file).load_module()
|
module_name = "".join(
|
||||||
|
random.choice(string.ascii_letters) for _ in range(20)
|
||||||
|
)
|
||||||
|
SourceFileLoader(module_name, file).load_module()
|
||||||
except Exception:
|
except Exception:
|
||||||
has_faillure = True
|
has_failure = True
|
||||||
print(file)
|
print(file)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
print()
|
print()
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import random
|
||||||
|
import string
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from importlib.machinery import SourceFileLoader
|
from importlib.machinery import SourceFileLoader
|
||||||
@ -7,9 +9,12 @@ if __name__ == "__main__":
|
|||||||
has_failure = False
|
has_failure = False
|
||||||
for file in files:
|
for file in files:
|
||||||
try:
|
try:
|
||||||
SourceFileLoader("x", file).load_module()
|
module_name = "".join(
|
||||||
|
random.choice(string.ascii_letters) for _ in range(20)
|
||||||
|
)
|
||||||
|
SourceFileLoader(module_name, file).load_module()
|
||||||
except Exception:
|
except Exception:
|
||||||
has_faillure = True
|
has_failure = True
|
||||||
print(file)
|
print(file)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
print()
|
print()
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import random
|
||||||
|
import string
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from importlib.machinery import SourceFileLoader
|
from importlib.machinery import SourceFileLoader
|
||||||
@ -7,9 +9,12 @@ if __name__ == "__main__":
|
|||||||
has_failure = False
|
has_failure = False
|
||||||
for file in files:
|
for file in files:
|
||||||
try:
|
try:
|
||||||
SourceFileLoader("x", file).load_module()
|
module_name = "".join(
|
||||||
|
random.choice(string.ascii_letters) for _ in range(20)
|
||||||
|
)
|
||||||
|
SourceFileLoader(module_name, file).load_module()
|
||||||
except Exception:
|
except Exception:
|
||||||
has_faillure = True
|
has_failure = True
|
||||||
print(file)
|
print(file)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
print()
|
print()
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import random
|
||||||
|
import string
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from importlib.machinery import SourceFileLoader
|
from importlib.machinery import SourceFileLoader
|
||||||
@ -7,9 +9,12 @@ if __name__ == "__main__":
|
|||||||
has_failure = False
|
has_failure = False
|
||||||
for file in files:
|
for file in files:
|
||||||
try:
|
try:
|
||||||
SourceFileLoader("x", file).load_module()
|
module_name = "".join(
|
||||||
|
random.choice(string.ascii_letters) for _ in range(20)
|
||||||
|
)
|
||||||
|
SourceFileLoader(module_name, file).load_module()
|
||||||
except Exception:
|
except Exception:
|
||||||
has_faillure = True
|
has_failure = True
|
||||||
print(file)
|
print(file)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
print()
|
print()
|
||||||
|
Loading…
Reference in New Issue
Block a user