pytorch
32f50b70 - Improve type annotations for `jit.script` (#108782)

Commit
2 years ago
Improve type annotations for `jit.script` (#108782) Fixes #108781 - [x] added `@overload` for `jit.script` - [x] added typing unittest in `test/typing/pass/jit.py` - NOTE: unittest is not automatically checked by mypy when executing lintrunner currently. (how to fix?) - [x] used `stubgen` to create [torch/jit/_script.pyi](https://github.com/pytorch/pytorch/pull/108782/files#diff-738e66abee2523a952b3ddbaecf95e187cce559473cf8c1b3da7c247ee5d1132) and added overloads there. (adding them inside `_script.py` itself interfered with JIT engine) Pull Request resolved: https://github.com/pytorch/pytorch/pull/108782 Approved by: https://github.com/ezyang
Committer
Parents
Loading