(obj: Any)
| 176 | |
| 177 | |
| 178 | def is_pydantic_v1_model_instance(obj: Any) -> bool: |
| 179 | # TODO: remove this function once the required version of Pydantic fully |
| 180 | # removes pydantic.v1 |
| 181 | try: |
| 182 | with warnings.catch_warnings(): |
| 183 | warnings.simplefilter("ignore", UserWarning) |
| 184 | from pydantic import v1 |
| 185 | except ImportError: # pragma: no cover |
| 186 | return False |
| 187 | return isinstance(obj, v1.BaseModel) |
| 188 | |
| 189 | |
| 190 | def is_pydantic_v1_model_class(cls: Any) -> bool: |
no outgoing calls
no test coverage detected
searching dependent graphs…