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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file generic-args-0.0.2.tar.gz.

File metadata

  • Download URL: generic-args-0.0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.8.6 Linux/5.4.0-65-generic

File hashes

Hashes for generic-args-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6b36863f307a244124e8958b4b77435b826ccbe4aa46481130b374f42350643d
MD5 014011af0f48e7410654ec72e00d02a0
BLAKE2b-256 b795865de82dfa5175db54e41d27e3eccc9b9cb88e29fef8e78cbed740510083

See more details on using hashes here.

File details

Details for the file generic_args-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: generic_args-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.8.6 Linux/5.4.0-65-generic

File hashes

Hashes for generic_args-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fe7c32b4432408da19af619d14864dcd49bf8b8040dde28ff6038894c62901ff
MD5 82693311bf75e72cf27f1972023df4a9
BLAKE2b-256 b027a0d63a46dcd4ee096ffee085a5f63c8dce5377760c6d2225990c5ea053f5

See more details on using hashes here.

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