mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 11:55:21 +00:00
Using `pyupgrade` to get all `partners` code up to 3.9 standards (mostly, fixing old `typing` imports).
16 lines
374 B
Python
16 lines
374 B
Python
import sys
|
|
import traceback
|
|
from importlib.machinery import SourceFileLoader
|
|
|
|
if __name__ == "__main__":
|
|
files = sys.argv[1:]
|
|
has_failure = False
|
|
for file in files:
|
|
try:
|
|
SourceFileLoader("x", file).load_module()
|
|
except Exception:
|
|
has_failure = True
|
|
traceback.print_exc()
|
|
|
|
sys.exit(1 if has_failure else 0)
|