pytorch/torch/_strobelight
Kasperi Apell a7915c56f6 Propagate callable parameter types using ParamSpec (#142306) (#143797)
The codebase has a few locations where callable parameter type information is lost when the unpackings *args and **kwargs are typed as Any. Refactor these instances to retain type information using typing_extensions.ParamSpec.

Also, in these functions, enforce return type with TypeVar.

Addresses #142306

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143797
Approved by: https://github.com/Skylion007

Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
Co-authored-by: Xuehai Pan <XuehaiPan@outlook.com>
2024-12-29 23:03:14 +00:00
..
examples Remove unused Python variables in torch/[_-a]* (#133492) 2024-12-12 17:39:14 +00:00
__init__.py
cli_function_profiler.py Propagate callable parameter types using ParamSpec (#142306) (#143797) 2024-12-29 23:03:14 +00:00
compile_time_profiler.py Increase default COMPILE_STROBELIGHT_MAX_STACK_LENGTH to 500 (#138006) 2024-10-17 07:31:32 +00:00