Typish

Latest version: v1.9.3

Safety actively analyzes 619426 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.9.3

* Fix for `setup.py` to actually exclude tests and test resources.

1.9.2

* Bugfix: `get_origin` did not work with `python3.9+` parameterized collections (e.g. `dict[str, str]`).

1.9.1

* Feature: added `is_optional_type` to determine whether a type is considered to be optional.

1.8.0

* Bugfix: `instance_of` with `Literal` with multiple args failed
* Bugfix: `get_origin` failed with classes with shadowing names
* Compatibility: Python 3.9
* Compatibility: `nptyping`

1.7.0

* Feature:` register_get_type` allows customizing the `get_type`, `instance_of` and `subclass_of` checks.
* Feature: `hintable` allows capturing the type hint before a function call.
* Feature: `is_from_typing` returns whether some class originates from the typing module.
* Feature: `get_mro wraps` around `inspect.getmro` to support types from `typing`.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.