dynamic.py
1 """Deprecated. Import from `griffe_pydantic` directly instead.""" 2 3 import warnings 4 from typing import Any 5 6 from griffe_pydantic._internal import dynamic 7 8 # YORE: Bump 2: Remove file. 9 10 11 def __getattr__(name: str) -> Any: 12 warnings.warn( 13 "Importing from `griffe_pydantic.common` is deprecated. Import from `griffe_pydantic` directly instead.", 14 DeprecationWarning, 15 stacklevel=2, 16 ) 17 try: 18 return getattr(dynamic, name) 19 except AttributeError: 20 return getattr(dynamic, name.removeprefix("_"))