Open InvincibleRMC opened 5 days ago
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.ini
@hamdanal, might be of interest to you? :)
Following up it would be very helpful if stubgen could generate the following automatically
from typing import TypeVar T = TypeVar("T")
Bug Report
Trying to infer types from docstrings with python3.12 inline generics fails to generate.
To Reproduce
Expected Behavior
Actual Behavior
Your Environment
mypy.ini
(and other config files):