If this is a generic class (A[str]), return the generic base for it.
(cl)
| 93 | |
| 94 | |
| 95 | def get_generic_base(cl): |
| 96 | """If this is a generic class (A[str]), return the generic base for it.""" |
| 97 | if cl.__class__ is _GenericAlias: |
| 98 | return cl.__origin__ |
| 99 | return None |