Given an instantiated generic class, retrieve the type arguments of itself or its parents.
The packages solves the problem described at this StackOverflow question.
pip install generic-args
Showcase how your project can be used:
from typing import List
from generic_args import generic_type_args
generic_type_args(List[int])
# (<type 'int'>, )
This project was generated with wemake-python-package
. Current template version is: 54efe958f72ac06e912a1423aa14be8b149f988f. See what is updated since then.