ForwardRef wrappers to be removed from argument type annotations, as per 8702f62.
Actual behavior
For arguments, the wrapper is removed only if the entire type is quoted. When a quoted reference forms part of a larger type (e.g. Optional["MyClass"]), the wrapper persists in the formatted annotation.
Return types are however correctly parsed in either style.
Expected behavior
ForwardRef
wrappers to be removed from argument type annotations, as per 8702f62.Actual behavior
For arguments, the wrapper is removed only if the entire type is quoted. When a quoted reference forms part of a larger type (e.g.
Optional["MyClass"]
), the wrapper persists in the formatted annotation.Return types are however correctly parsed in either style.
Example
This produces the following, with
ForwardRef
wrapping the argument tomin_quoted
but not its return type:Additional info