basedmypy
basedmypy copied to clipboard
handle stringified types consistently
# python3.8
a: "list[int]" # error: "list" is not subscriptable, use "typing.List" instead
cast("list[int]", []) # valid
cast(List["list[int]"], []) # error
cast has inconsistent behaviour because I think it makes sense to allow it like that, so why not all stringified types?
maybe because of introspection reasons? which don't apply to cast.