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