i.e. How to make this work?
python doesn't allow this:
from typing import List
isinstance(["a", "b"], List[str])
# TypeError: Subscripted generics cannot be used with class and instance checks
possible solution:
from typing import List
import third_party_package
third_party_package.isinstance(["a", "b"], List[str])
I tried mypy, but mypy seems can only be called by command line. I have no idea how to make it work by python code.