Files
FastDeploy/third_party/onnx/tools/mypy-onnx.py
Jason 6343b0db47 [Build] Support build with source code of Paddle2ONNX (#1559)
* Add notes for tensors

* Optimize some apis

* move some warnings

* Support build with Paddle2ONNX

* Add protobuf support

* Fix compile on mac

* add clearn package script

* Add paddle2onnx code

* remove submodule

* Add onnx ocde

* remove softlink

* add onnx code

* fix error

* Add cmake file

* fix patchelf

* update paddle2onnx

* Delete .gitmodules

---------

Co-authored-by: PaddleCI <paddle_ci@example.com>
Co-authored-by: pangyoki <pangyoki@126.com>
Co-authored-by: jiangjiajun <jiangjiajun@baidu.lcom>
2023-03-17 10:03:22 +08:00

24 lines
664 B
Python

#!/usr/bin/env python
# SPDX-License-Identifier: Apache-2.0
import subprocess
import os
def main() -> None:
try:
root_folder = os.path.realpath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
os.chdir(root_folder)
# Use --no-site-packages to prevent mypy catching other typecheck errors which are not related to ONNX itself
subprocess.check_call(["mypy", ".", "--no-site-packages"])
exit(0)
except subprocess.CalledProcessError:
# Catch this exception because we don't want it to output a backtrace that would clutter the mypy output
exit(1)
if __name__ == '__main__':
main()