Type Variances

The culprit I was minding my own business writing some type-annotated Python code when my type checker of trust did me dirty and nerd-sniped me. error: Return type 'list[A]' of 'list_method' incompatible with return type 'list[A | B]' in supertype 'ParentClass' [ override ] Oof. Let&rsquo;s provide some context. Say we have a simple inheritance structure, where ChildClass inherits from ParentClass…