I have a function which takes a list of a base class as argument, and I have a variable which is a list of a derived class. Using this variable as the argument gives mypy error: *Argument 1 to "do\_stuff" has incompatible type "List[DerivedClass]"; expected "List[BaseClass]"*.

```py
class BaseClass(TypedDict):
    base_field: str

class DerivedClass(BaseClass):
    derived_field: str

def do_stuff(data: List[BaseClass]) -> None:
    pass

foo: List[DerivedClass] = [{'base_field': 'foo', 'derived_field': 'bar'}]

do_stuff(foo)

```

If the argument and variable are instead BaseClass and DerivedClass respectively, i.e. not lists, it understands that the variable can be casted implicitly to the base class. But for lists it doesn't work. How can I solve this, preferably other than *#type: ignore*.