Typing-validation

Latest version: v1.2.12

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

Scan your dependencies

Page 2 of 3

1.2.6

Changed the return type of ``validate`` from ``None`` to ``Literal[True]``, so that validation calls can be gated behind assertions and compiled away in optimised scenarios:

py
from typing_validation import validate

assert validate(val, t) this is compiled away with -O or -OO


Introduced a variant ``is_valid`` of ``validate`` which returns a ``bool``:

py
from typing_validation import is_valid

if is_valid(val, t):
... do stuff
else:
... handle error


In case of validation failure, failure information is made available using ``latest_validation_failure``:

py
from typing_validation import is_valid, latest_validation_failure

if is_valid(val, t):
... do stuff
else:
cause = latest_validation_failure()
... handle error

1.2.5

**Full Changelog**: https://github.com/hashberg-io/typing-validation/compare/v1.2.4...v1.2.5

1.2.4

**Full Changelog**: https://github.com/hashberg-io/typing-validation/compare/v1.2.3...v1.2.4

1.2.3

1.2.2

Fixed several issues with the representation of `TypeInspector` objects and the reconstructor of the `recorded_type`. Fixed a bug of `can_validate` on special generic aliases (see issue 5).

**Full Changelog**: https://github.com/hashberg-io/typing-validation/compare/v1.2.1...v1.2.2

1.2.1

**Full Changelog**: https://github.com/hashberg-io/typing-validation/compare/v1.2.0...v1.2.1

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.