onnxruntime
82f3a83f - Add PEP 561 `py.typed` marker to the `onnxruntime` package (#28438)

Commit
84 days ago
Add PEP 561 `py.typed` marker to the `onnxruntime` package (#28438) ### Description Adds the standard PEP 561 `py.typed` marker so type checkers (mypy, pyright) consider the inline annotations in `onnxruntime`. Without it, mypy emits: ``` error: Skipping analyzing "onnxruntime": module is installed, but missing library stubs or py.typed marker [import-untyped] ``` ### Changes - `onnxruntime/py.typed` — empty marker at the importable package root. - `setup.py` — include the marker in `package_data["onnxruntime"]`. - `onnxruntime/test/python/test_pep561_py_typed_marker.py` — regression test. ### Verification Tested locally with `mypy 2.0.0` against an installed `onnxruntime` wheel: the `import-untyped` error reproduces without the marker and disappears with it. `python setup.py sdist` packages `onnxruntime/py.typed` correctly. `lintrunner` clean. ### Motivation and Context Fixes #23108.
Author
Parents
Loading