is_generic

Returns True if the annotation is or extends a generic.

Signature:

def is_generic(annotation: type) -> bool:
...

Parameters:

  1. annotation:

    Type
    type