SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > site-packages > pydantic >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib64/python3.11/site-packages/pydantic/

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
_internal Directory - -
deprecated Directory - -
plugin Directory - -
v1 Directory - -
__init__.py File 5814 bytes March 06 2024 00:27:04.
_migration.py File 11899 bytes March 06 2024 00:27:04.
alias_generators.py File 1141 bytes March 06 2024 00:27:04.
annotated_handlers.py File 4346 bytes March 06 2024 00:27:04.
class_validators.py File 147 bytes March 06 2024 00:27:04.
color.py File 21493 bytes March 06 2024 00:27:04.
config.py File 24737 bytes March 06 2024 00:27:04.
dataclasses.py File 11490 bytes March 06 2024 00:27:04.
datetime_parse.py File 149 bytes March 06 2024 00:27:04.
decorator.py File 144 bytes March 06 2024 00:27:04.
env_settings.py File 147 bytes March 06 2024 00:27:04.
error_wrappers.py File 149 bytes March 06 2024 00:27:04.
errors.py File 4595 bytes March 06 2024 00:27:04.
fields.py File 45513 bytes March 06 2024 00:27:04.
functional_serializers.py File 10780 bytes March 06 2024 00:27:04.
functional_validators.py File 20471 bytes March 06 2024 00:27:04.
generics.py File 143 bytes March 06 2024 00:27:04.
json.py File 139 bytes March 06 2024 00:27:04.
json_schema.py File 100686 bytes March 06 2024 00:27:04.
main.py File 62260 bytes March 06 2024 00:27:04.
mypy.py File 50721 bytes March 06 2024 00:27:04.
networks.py File 20543 bytes March 06 2024 00:27:04.
parse.py File 140 bytes March 06 2024 00:27:04.
py.typed File 0 bytes March 06 2024 00:27:04.
root_model.py File 4949 bytes March 06 2024 00:27:04.
schema.py File 141 bytes March 06 2024 00:27:04.
tools.py File 140 bytes March 06 2024 00:27:04.
type_adapter.py File 18818 bytes March 06 2024 00:27:04.
types.py File 72231 bytes March 06 2024 00:27:04.
typing.py File 137 bytes March 06 2024 00:27:04.
utils.py File 140 bytes March 06 2024 00:27:04.
validate_call.py File 1780 bytes March 06 2024 00:27:04.
validators.py File 145 bytes March 06 2024 00:27:04.
version.py File 2307 bytes March 06 2024 00:27:04.
warnings.py File 1947 bytes March 06 2024 00:27:04.

Reading File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/pydantic//validate_call.py

"""Decorator for validating function calls."""
from __future__ import annotations as _annotations

from typing import TYPE_CHECKING, Any, Callable, TypeVar, overload

from ._internal import _validate_call

__all__ = ('validate_call',)

if TYPE_CHECKING:
    from .config import ConfigDict

    AnyCallableT = TypeVar('AnyCallableT', bound=Callable[..., Any])


@overload
def validate_call(
    *, config: ConfigDict | None = None, validate_return: bool = False
) -> Callable[[AnyCallableT], AnyCallableT]:
    ...


@overload
def validate_call(__func: AnyCallableT) -> AnyCallableT:
    ...


def validate_call(
    __func: AnyCallableT | None = None,
    *,
    config: ConfigDict | None = None,
    validate_return: bool = False,
) -> AnyCallableT | Callable[[AnyCallableT], AnyCallableT]:
    """Usage docs: https://docs.pydantic.dev/2.4/concepts/validation_decorator/

    Returns a decorated wrapper around the function that validates the arguments and, optionally, the return value.

    Usage may be either as a plain decorator `@validate_call` or with arguments `@validate_call(...)`.

    Args:
        __func: The function to be decorated.
        config: The configuration dictionary.
        validate_return: Whether to validate the return value.

    Returns:
        The decorated function.
    """

    def validate(function: AnyCallableT) -> AnyCallableT:
        if isinstance(function, (classmethod, staticmethod)):
            name = type(function).__name__
            raise TypeError(f'The `@{name}` decorator should be applied after `@validate_call` (put `@{name}` on top)')
        return _validate_call.ValidateCallWrapper(function, config, validate_return)  # type: ignore

    if __func:
        return validate(__func)
    else:
        return validate

SILENT KILLER Tool