Only concrete class can be given where "Type[Abstract]" is expected
when creating a list comprehension of an ABC's concrete subclasses
#16442
Labels
I'm getting an error when creating a list of classes using a comprehension. The classes are concrete subclasses of an abstract base class.
This error disappears if I remove the
@abstractmethod
decorator.There is also no error if I only iterate over a tuple with only one element, like so:
The text was updated successfully, but these errors were encountered: