Pydantic v2 has the validate_call() decorator which provides support for validating types of input parameters, we could use this instead of the home-grown check_types() decorator.
While we're at it, we could also make use of pydantic's Field to express some additional constraints on parameters, e.g., numeric constraints.
Pydantic v2 has the validate_call() decorator which provides support for validating types of input parameters, we could use this instead of the home-grown check_types() decorator.
While we're at it, we could also make use of pydantic's Field to express some additional constraints on parameters, e.g., numeric constraints.