Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for __str__ (0.16 sec)

  1. tests/test_inherited_custom_class.py

    from pydantic import BaseModel
    
    from .utils import needs_pydanticv1, needs_pydanticv2
    
    
    class MyUuid:
        def __init__(self, uuid_string: str):
            self.uuid = uuid_string
    
        def __str__(self):
            return self.uuid
    
        @property  # type: ignore
        def __class__(self):
            return uuid.UUID
    
        @property
        def __dict__(self):
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. fastapi/exceptions.py

        pass
    
    
    class ResponseValidationError(ValidationException):
        def __init__(self, errors: Sequence[Any], *, body: Any = None) -> None:
            super().__init__(errors)
            self.body = body
    
        def __str__(self) -> str:
            message = f"{len(self._errors)} validation errors:\n"
            for err in self._errors:
                message += f"  {err}\n"
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
Back to top