Open
Description
Bug Report
Trying to infer types from docstrings with python3.12 inline generics fails to generate.
To Reproduce
from mypy.stubdoc import infer_sig_from_docstring
infer_sig_from_docstring('\nfunc[T, V](x: T, y: V) -> T', 'func')
Expected Behavior
infer_sig_from_docstring('\nfunc[T, V](x: T, y: V) -> T', 'func') ==
[
FunctionSig(
name="func", args=[ArgSig(name="x", type="T"), ArgSig(name="y", type="V")], ret_type="T"
)
]
Actual Behavior
infer_sig_from_docstring('\nfunc[T, V](x: T, y: V) -> T', 'func') == []
Your Environment
- Mypy version used: 1.11.dev
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini
(and other config files): - Python version used: python 3.10