Skip to main content

Type Hint Checker

a replacement for isinstance that works with type hints

exports are_type_compatible which can be used as a drop in replacement for isinstance but works with type hints

are_type_compatible([0, 1, 2], list[int]) # true
are_type_compatible([0, 1, "2"], list[int]) # false

also takes two optional arguments the context which would be the function or class the type hint came from and the namespace which is the namespace to search for types

Release files for rj-type-hint-checker 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rj-type-hint-checker 0.0.0
File Size Uploaded
rj_type_hint_checker-0.0.0.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rj-type-hint-checker 0.0.0
File Interpreter ABI Platform
rj_type_hint_checker-0.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / rj_type_hint_checker-0.0.0.tar.gz

Download URL rj_type_hint_checker-0.0.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
41885e45de7bc9cd41e9a0a2e0f6995a3eab6d047e5c7d6e96a88bb9a4324ce8
BLAKE2b-256 checksum
How to use checksums
7d044b945fdeafd4b14cc6920f52cacc8c7638286d88d48972fbb2e9bbe3226c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.1

Release files / rj_type_hint_checker-0.0.0-py3-none-any.whl

Download URL rj_type_hint_checker-0.0.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
265c6ea86ba18ca994b4f09dc73cbf5546c6865c1d374fbbc7bd46b155c9a337
BLAKE2b-256 checksum
How to use checksums
9fd5cc59a1e3d6892543af5d5784c383307985b07f4b3e8eeec73ab9e6e13d8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page