Skip to main content

Given an instantiated generic class, retrieve the type arguments of itself or its parents.

Project description

generic-args

Build Status codecov Python Version wemake-python-styleguide

Given an instantiated generic class, retrieve the type arguments of itself or its parents.

The packages solves the problem described at this StackOverflow question.

Installation

pip install generic-args

Example

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'>, )

License

MIT

Credits

This project was generated with wemake-python-package. Current template version is: 54efe958f72ac06e912a1423aa14be8b149f988f. See what is updated since then.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

generic-args-0.0.2.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

generic_args-0.0.2-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page